linfa
Library Featured
A Machine Learning framework for Rust
- Downloads
- 177,963
- Dependents
- 60
- Stars
- 4,770
- Forks
- 331
- Contributors
- 63
- Commits
- 382
- Latest release
- 0.8.1 ·
About
linfa (Italian) / sap (English):
The vital circulating fluid of a plant.
linfa aims to provide a comprehensive toolkit to build Machine Learning applications with Rust.
Kin in spirit to Python's scikit-learn, it focuses on common preprocessing tasks and classical ML algorithms for your everyday ML tasks.
Current state
Where does linfa stand right now? Are we learning yet?
linfa currently provides sub-packages with the following algorithms:
Read the full README
| Name | Purpose | Status | Category | Notes |
|---|---|---|---|---|
| bayes | Naive Bayes | Tested | Supervised learning | Contains Bernouilli, Gaussian and Multinomial Naive Bayes |
| clustering | Data clustering | Tested / Benchmarked | Unsupervised learning | Clustering of unlabeled data; contains K-Means, Gaussian-Mixture-Model, DBSCAN and OPTICS |
| ensemble | Ensemble methods | Tested | Supervised learning | Contains bagging, random forest and AdaBoost |
| elasticnet | Elastic Net | Tested | Supervised learning | Linear regression with elastic net constraints |
| ftrl | Follow The Regularized Leader - proximal | Tested / Benchmarked | Partial fit | Contains L1 and L2 regularization. Possible incremental update |
| hierarchical | Agglomerative hierarchical clustering | Tested | Unsupervised learning | Cluster and build hierarchy of clusters |
| ica | Independent component analysis | Tested | Unsupervised learning | Contains FastICA implementation |
| kernel | Kernel methods for data transformation | Tested | Pre-processing | Maps feature vector into higher-dimensional space |
| lars | Linear regression | Tested | Supervised learning | Contains Least Angle Regression (LARS) |
| linear | Linear regression | Tested | Supervised learning | Contains Ordinary Least Squares (OLS), Generalized Linear Models (GLM) |
| logistic | Logistic regression | Tested | Partial fit | Builds two-class logistic regression models |
| nn | Nearest Neighbours & Distances | Tested / Benchmarked | Pre-processing | Spatial index structures and distance functions |
| pls | Partial Least Squares | Tested | Supervised learning | Contains PLS estimators for dimensionality reduction and regression |
| preprocessing | Normalization & Vectorization | Tested / Benchmarked | Pre-processing | Contains data normalization/whitening and count vectorization/tf-idf |
| reduction | Dimensionality reduction | Tested | Pre-processing | Diffusion mapping, Principal Component Analysis (PCA), Random projections |
| svm | Support Vector Machines | Tested | Supervised learning | Classification or regression analysis of labeled datasets |
| trees | Decision trees | Tested / Benchmarked | Supervised learning | Linear decision trees |
| tsne | Dimensionality reduction | Tested | Unsupervised learning | Contains exact solution and Barnes-Hut approximation t-SNE |
We believe that only a significant community effort can nurture, build, and sustain a machine learning ecosystem in Rust - there is no other way forward.
If this strikes a chord with you, please take a look at the roadmap and get involved!
Browser WASM
For browser-style WASM on wasm32-unknown-unknown, enable linfa's wasm-bindgen feature.
BLAS/Lapack backend
Some algorithm crates need to use an external library for linear algebra routines. By default, we use a pure-Rust implementation. However, you can also choose an external BLAS/LAPACK backend library instead, by enabling the blas feature and a feature corresponding to your BLAS backend. Currently you can choose between the following BLAS/LAPACK backends: openblas, netblas or intel-mkl.
| Backend | Linux | Windows | macOS |
|---|---|---|---|
| OpenBLAS | ✔️ | - | - |
| Netlib | ✔️ | - | - |
| Intel MKL | ✔️ | ✔️ | ✔️ |
Each BLAS backend has two features available. The feature allows you to choose between linking the BLAS library in your system or statically building the library. For example, the features for the intel-mkl backend are intel-mkl-static and intel-mkl-system.
An example set of Cargo flags for enabling the Intel MKL backend on an algorithm crate is --features blas,linfa/intel-mkl-system. Note that the BLAS backend features are defined on the linfa crate, and should only be specified for the final executable.
License
Dual-licensed to be compatible with the Rust project.
Licensed under the Apache License, Version 2.0 http://www.apache.org/licenses/LICENSE-2.0 or the MIT license http://opensource.org/licenses/MIT, at your option. This file may not be copied, modified, or distributed except according to those terms.
Compatibility
- Runs on
- GPU support unknown
What shows it
- no dependency or feature matches a backend row
- Native code
- Optional
- Binds native code: lapack-sys (feature intel-mkl-static)
- Python bindings
- No Python binding crate found
- License
- Apache-2.0 OR MIT
Compare with similar projects
Order: strongest tier first, then most downloads, then name, with unmeasured values last. A library counts downloads over 30 days. An app counts binary downloads per release. An app with none counts its crate downloads over 30 days. ML Rust runs this catalogue, so its closest project always gets a row.
| Project | Downloads | Dependents | Stars | Latest release | Runs on (GPU) | Native code | License |
|---|---|---|---|---|---|---|---|
|
A Machine Learning framework for Rust |
177,963 downloads over 30 days | 60 | 4,770 | 0.8.1 | GPU support unknown | Binds native code: lapack-sys (feature intel-mkl-static) | Apache-2.0 OR MIT |
|
smartcore Featured
Machine Learning in Rust. |
39,473 downloads over 30 days | 33 | 976 | 0.7.0 | GPU support unknown | No native code found | Apache-2.0 |
|
A machine learning package for Rust. |
578 downloads over 30 days | 2 | 647 | 0.5.0 | GPU support unknown | Binds native code: libsvm | Apache-2.0 |
|
rust-automl Listed
Automated machine learning for classification and regression |
170 downloads over 30 days | 1 | 39 | 0.3.1 | GPU support unknown | No native code found | Apache-2.0 OR MIT |
|
treeboost Listed
Gradient-boosted decision trees for tabular data: trains a baseline model in one call, with full control over boosting modes and configs, and Scalar, AVX-512, SVE2, WGPU and CUDA backends. Python bindings |
18 downloads over 30 days | 0 | 9 | 0.1.2 | CUDA, WebGPU | No native code found | Apache-2.0 |
|
Fwumious Wabbit, fast on-line machine learning toolkit written in Rust |
0 binary downloads per release | Not applicable | 141 | Not measured | Not measured | Not measured | |
|
A Rust🦀 implementation of CRAFTML, an Efficient Clustering-based Random Forest for Extreme Multi-label Learning |
Not measured | Not applicable | 15 | Not measured | Not measured | Not measured | MIT |
Why FeaturedIt passes every Featured gate.
What it meets
- It has 29 active dependents and 20 new dependents in 365 days. Featured needs 11 active dependents or 9 new dependents in 365 days.
- Active dependents are at 95% of their peak. Featured needs at least 50%.
- Docs are present. The release commit or a manifest ties the crate to the repository.
- No vulnerability advisory stays unpatched past the grace window. At least one version is neither a prerelease nor 0.0.x.
- The last activity is on 22 Aug 2026, 79 days ago. The rules expect an update within 1200 days. Dormancy rule
Exact rules: Featured library. The check on applied thresholds version 9.
Every rule outcome, as the check records it
expected-interval: version 0.8.1 base 300, doubled for 177963 downloads per month, doubled for 28.5 active users: E = 1200 daysdormancy: last activity 2026-08-22, 79 days ago, E = 1200: activefeatured: featured: active_users 28.5, new_adopters 19.5, former_glory 0.95
Crates20 crates
Related projects
Measurements and sources
Each signal row shows the raw value, its source and the fetch date. The Sources list gathers every distinct source on this page. Movement needs more history.
Sources6 sources
- Description: the crates.io description
- crates.io database dump, fetched
- RustSec advisory database, fetched
- GitHub repository, fetched
- crates.io package, fetched
- GitHub contributors, fetched
Adoption29 active dependents, 20 new dependents in 365 days1 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Active dependents | 28.5 | crates.io database dump | Yes | |
| New dependents (365 days) | 19.5 | crates.io database dump | Yes | |
| Peak active dependents | 31.5 | crates.io database dump | Yes | |
| Active dependents as a share of the peak | 0.9518 | crates.io database dump | Yes | |
| Binary downloads per release | Not measured | Yes |
MaintenanceLatest human commit: 2 months ago3 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Latest human commit | 2026-08-22 | GitHub repository | Yes | |
| Latest release | 2025-12-23 | crates.io database dump | Yes | |
| First release | 2018-04-05 | crates.io database dump | Yes | |
| Latest version | 0.8.1 | crates.io database dump | Yes | |
| Days the oldest outside issue waits for a reply | 966 | GitHub repository | Yes | |
| Maintainer replies over 365 days | 21 | GitHub repository | Yes | |
| Repository archived | false | GitHub repository | Yes | |
| Repository gone | false | GitHub repository | Yes | |
| Release commit or manifest in the repo | true | crates.io package | Yes | |
| Published docs | true | crates.io database dump | Yes | |
| Latest release fails cargo check | Not measured | Yes | ||
| Build check date | Not measured | Yes | ||
| Build check toolchain | Not measured | Yes |
SecurityUnpatched vulnerabilities: none
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Unpatched vulnerabilities past the grace window | none | RustSec advisory database | Yes | |
| RustSec unmaintained advisory | none | RustSec advisory database | Yes | |
| Deprecation notice | none | crates.io database dump | Yes | |
| Deprecated requirement | none | crates.io database dump | Yes |
Distribution15 releases, 177,963 downloads over 30 days5 not measured
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| Releases | 15 | crates.io database dump | Yes | |
| Downloads over 30 days | 177963 | crates.io database dump | Yes | |
| Binary downloads over the last 3 releases | Not measured | Yes | ||
| Homebrew installs on request over 365 days | Not measured | Yes | ||
| Repology repository families | Not measured | Yes | ||
| Docker pull growth over 90 days | Not measured | Yes | ||
| Docker pulls at the growth baseline | Not measured | Yes | ||
| Every version a prerelease | false | crates.io database dump | Yes | |
| Every version 0.0.x | false | crates.io database dump | Yes | |
| Every version yanked | false | crates.io database dump | Yes | |
| Crate deleted from crates.io | false | crates.io database dump | Yes |
Repository4,770 stars, 331 forks, 63 contributors, 382 commits. Stars alone never qualify a project.
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| GitHub stars | 4770 | GitHub repository | Yes — one part of the repository route | |
| GitHub forks | 331 | GitHub repository | Yes — one part of the repository route | |
| Contributors with a GitHub account | 63 | GitHub contributors | Yes — one part of the repository route | |
| Commits on the default branch | 382 | GitHub repository | No | |
| Repository's main crate left out of the entry | none | crates.io database dump | Yes |
Facts that never count
| Signal | Value | Source | Fetched | Counts |
|---|---|---|---|---|
| License | Apache-2.0 OR MIT | crates.io database dump | No | |
| Runs on, from listed crates and their direct dependencies | GPU support unknown | crates.io database dump | No | |
| What shows each backend | no dependency or feature matches a backend row | crates.io database dump | No | |
| Native code, from listed crates and their dependencies | Binds native code: lapack-sys (feature intel-mkl-static) | crates.io database dump | No | |
| Python bindings, from direct dependencies of listed crates | No Python binding crate found | crates.io database dump | No | |
| Crates that depend on a listed crate directly | 60 | crates.io database dump | No |
Corrections and review history
No correction applies to this entry.
Judgments
A judgment enters only through an approved issue and a merged pull request.
No judgment applies to this entry.