← all repositories
smartcorelib/smartcore

Rust machine learning that treats WASM as the default target

It brings classical machine learning to Rust with an eye toward browser and embedded deployment via WASM-first defaults.

940 stars Rust ML Frameworks
smartcore
Not currently ranked — collecting fresh signals.
star history

What it does

smartcore is a Rust library covering the usual classical ML suspects—linear models, trees, SVMs, neighbors, clustering, and matrix decomposition—behind a trait-based linear algebra abstraction. It offers optional ndarray integration, built-in dataset generators, CSV readers, and model-selection utilities. The API is currently in a v0.4 trait-system refactor that favors object-safe traits over concrete structs.

The interesting bit

smartcore adopts a WASM/WASI-first posture that is unusual for a classical ML toolkit: features like serde and file-system datasets are opt-in rather than baked in. That portability focus shapes everything from the RNG plumbing to the IO abstractions, making it less likely to accidentally call std::fs in a browser tab.

Key highlights

  • Broad classical algorithm coverage: OLS, Ridge, Lasso, Logistic Regression, Random Forest, Extra Trees, SVMs, KNN, K-Means, DBSCAN, and matrix decompositions (SVD, LU, QR, Cholesky).
  • Modular linear algebra traits with optional ndarray support; recent versions dropped nalgebra-bindings in favor of an ndarray-only path.
  • Deterministic algorithm controls via explicit RNG plumbing across the library.
  • Built-in dataset generators (make_blobs, make_circles, make_moons) and sample datasets (digits, diabetes, breast cancer) available behind feature flags.
  • Companion Jupyter notebook repository using EVCXR for interactive Rust experimentation.

Caveats

  • The v0.4 release involved a large trait-system refactor and codebase reorganization; consult the CHANGELOG for breaking changes and deprecations.
  • Some file-system operations are restricted or gated in WASM targets, so built-in datasets and certain IO utilities require explicit feature flags.
  • The project has deprecated ndarray-bindings and dropped nalgebra support in favor of ndarray-only paths, which may affect existing code.

Verdict

Worth a look if you need classical ML in Rust that must run in browsers or constrained environments without rewriting the world. If you are committed to the Python ecosystem or need deep learning, this is not your crate.

Frequently asked

What is smartcorelib/smartcore?
It brings classical machine learning to Rust with an eye toward browser and embedded deployment via WASM-first defaults.
Is smartcore open source?
Yes — smartcorelib/smartcore is open source, released under the Apache-2.0 license.
What language is smartcore written in?
smartcorelib/smartcore is primarily written in Rust.
How popular is smartcore?
smartcorelib/smartcore has 940 stars on GitHub.
Where can I find smartcore?
smartcorelib/smartcore is on GitHub at https://github.com/smartcorelib/smartcore.

heatdrop uses Google Analytics to see which pages get read — nothing else. Your call. How we handle data.