datarust is a preprocessing-first classical ML library. Within the Rust
ecosystem its direct peers are smartcore and linfa. Deep-learning
frameworks (candle, burn, tch-rs) solve a different problem and are out of
scope here; rusty-machine has been archived and is omitted.
The three libraries were built around different priorities, which shows up in
every design decision:
datarust optimizes for preprocessing depth and zero-dependency
deployability. All linear algebra is pure Rust (Jacobi eigensolver,
Cholesky, coordinate descent), so the default build has no external C
libraries — it links cleanly into WASM, embedded targets, and CLI tools. The
trade-off is algorithm breadth: only the four linear models (Linear / Ridge /
Lasso / Logistic regression) and KMeans clustering are implemented so far.
smartcore optimizes for single-crate algorithm breadth. One dependency
gives you SVM, RandomForest, DecisionTree, KMeans, DBSCAN, KNN, NaiveBayes,
and more, plus model selection and metrics. The trade-off is preprocessing:
only StandardScaler and OneHotEncoder are provided, and the crate depends
on ndarray plus a BLAS backend.
linfa optimizes for modularity. Each algorithm family lives in its own
crate (linfa-svm, linfa-trees, linfa-clustering, linfa-ensemble, …)
behind a shared linfa-core trait surface, so you only compile what you use.
linfa-preprocessing additionally offers scalers and text vectorizers
(Count / TF-IDF). The trade-off: categorical encoders, imputers, and feature
selectors are sparse or undocumented, and Ridge/Lasso exist only through
linfa-elasticnet’s l1_ratio parameter.
Verified against the July 2026 releases: smartcore 0.5.3, linfa 0.8.1.
Legend: ✓ present, ✗ confirmed absent, ? not clearly documented at the
time of writing — please open an issue or PR if a cell goes stale.
These libraries are not mutually exclusive. Because all three expose plain
Vec/matrix in/out interfaces, you can mix them in a single pipeline: use
datarust for preprocessing (where its coverage is unique), then hand the
transformed features to a smartcore or linfa estimator for an algorithm datarust
doesn’t implement yet.