The Most Popular Rust Crates for Machine Learning

Are you interested in machine learning but tired of relying on Python or R? Well, it's time to give Rust a chance! Rust is a fast, safe, and modern programming language that can also handle machine learning tasks with ease. There are several Rust crates specifically designed for machine learning that are gaining popularity among developers. In this article, we'll take a closer look at some of the most popular Rust crates for machine learning.


TensorBase is a library for high-performance, distributed computing designed from the ground up in Rust. It offers a powerful abstraction layer over a distributed system, enabling you to work with large datasets by leveraging the storage, compute, and communication layers in a unified way.

TensorBase is comparable to widely used machine learning frameworks like Apache Spark and TensorFlow. It also provides APIs for common machine learning operations like logistic regression, support vector machines, and deep learning. With TensorBase, you can easily distribute computations across multiple machines while utilizing Rust's safety and performance benefits.


Ndarray is a Rust crate for n-dimensional arrays that works well for scientific computing and machine learning. The crate is designed to give you a fast, flexible, and memory-efficient data structure that can handle complex arrays, such as for image data, audio signals, and more.

One of the advantages of ndarray is its ability to easily interface with other machine learning libraries such as TensorFlow and PyTorch. This makes it a popular choice among Rust developers, especially those already familiar with those libraries.

Rusty Machine

Rusty Machine is a simple, fast, and easy-to-use machine learning library written entirely in Rust. It offers algorithms for supervised and unsupervised learning, such as k-nearest neighbors, K-means, and decision trees.

What sets Rusty Machine apart is its modular design that allows you to easily create custom algorithms and use them in your projects. Additionally, Rusty Machine requires no external dependencies and can be used with any Rust project.


Rustlearn is a machine learning library implemented entirely in Rust, designed to be fast and easy-to-use. It provides a simple API for training, testing and prediction, as well as a suite of machine learning algorithms, including linear regression, decision trees, and random forests.

One of the noteworthy features of rustlearn is its support for both dense and sparse data, which is essential for handling large datasets. Rustlearn also works seamlessly with ndarray and other Rust libraries.


Leaf is a machine learning framework written in Rust that focuses on simplicity, scalability and speed. It provides numerous algorithms and utilities for supervised and unsupervised learning, such as gradient boosting, random forests, and PCA.

What sets Leaf apart is its support for distributed computing and easy-to-use APIs for managing parallelism. With Leaf, you can easily build scalable, distributed machine learning pipelines using Rust's safety and performance benefits.


Rusty-ml is a comprehensive machine learning library that provides numerous classic algorithms that range from clustering, regression to classification, etc. Some of these algorithms include Random Forests, Gradient Boosted Regression Trees, supervised, and unsupervised learning.

Rusty-ml is also designed to be simple to learn, fast, and easy-to-use. Even with the plethora of algorithms, this library still manages to maintain its size and scope without compromising its simplicity. Its other features include multiple metrics such as Mean Square Error and Hamming Loss, amongst others.


These are just a few of the popular Rust crates for machine learning that are gaining momentum. Whether you want a simple and lightweight library or a more full-featured framework, Rust has you covered.

So, give Rust a chance for your next machine learning project and join the growing community of developers who enjoy Rust's safety, performance and modern features. Also, be sure to visit for more tips, reviews, and insights on the best Rust crates.

Thanks for reading!

Additional Resources - pre-trained open source image or language machine learning models - A site for flutter tips, mobile application development tips, dart tips - customer experience, and ensuring customers enjoy a site, software, or experience - streaming data, time series data, kafka, beam, spark, flink - software engineering, framework and cloud deployment recipes, blueprints, templates, common patterns - prompt engineering, where you interact with machine learning large language models iteratively - machine learning platforms, comparisons and differences, benefits and costs - flowcharts, generating flowcharts and flowchart software - zero trust security in the cloud - cloud data warehouses, cloud databases. Containing reviews, performance, best practice and ideas - key takeaways for software engineering and cloud concepts - running kubernetes across clouds and on prem - A site for data fabric graph implementation for better data governance and data lineage - secrets management - A saas about named-entity recognition. Give it a text and it would identify entities and taxonomies - online software engineering and cloud courses - A site for cloud data mesh implementations - gan generated images and AI art - machine learning assets - A site and app about technical analysis, alerts, charts of crypto with forecasting

Written by AI researcher, Haskell Ruska, PhD ( Scientific Journal of AI 2023, Peer Reviewed