Rust efforts in AI

As a matter of interest, are there any efforts with Rust in AI? I've heard about Leaf by AutumnAI but it looks like it's been abandoned and am interested to hear if there's other projects and efforts in the space.


Leaf is abandoned, but there are efforts to revive as Juice. But those effort are slow.

As for other things. Things are mostly immature, do not support many things or are abandoned. There are many crates where you can construct feedforward network, but very few where you can construct sequence to sequence translation network.

In non deeplearning ML space (classic things like trees, logistic regression, SVMs, ...), there is rustlearn and rusty-machine. Both semiabandoned and feature very incomplete. Rustlearn does only support binary classification (or one-vs-rest wrapping of it) and no regression. Rusty-machine does not support serialization or sparse data handling. And also each one of them comes with own matrix types.

And now comes shameless promotion of my efforts:
I have made wrapper for CNTK library (deeplearning from Microsoft). It is quite usable (you can do seq2seq there), but very low level (since it is build on top of CNTK C++ API, which is much more low level than their python API). But it comes with some reasonable examples.

I am also thinking about making something similar like python scikit-learn for Rust (yep another ML library). Right now I am mostly struggling with making unified API for NDArray and SPRS types.

And what is really missing is community. Both rust-ml/Lobby - Gitter and #rust-machine-learning seem to be really quiet.


Do you know what happened to AutumnAI (and Leaf)? Did they shut down?

Given the number of abandoned Rust ML projects, it’d be interesting to know if that’s at all a reflection on Rust readiness in this area or merely natural churn of OSS projects.

They have a blog about it: Tensorflow wins. We started with the development of Leaf… | by Michael Hirn | Medium

Mostly too strong competition.


does rust really help in this domain - isn't it mostly a case of writing 'utility code' to setup the real work on the GPU, as such the 'maths languages' are fine

having said that I've heard of people pursuing all sorts r.e. training ( e.g. procedural environments to help generalise )

1 Like

Depends on the usage.
If your usage is "I have this file with training data on disk, create neural network, save it and then serve it using API", then you will probably use Python and do not look back.

But when you have complicated usecase, two things might emerge:

  • Refactoring in Python (or other dynamic) language is hard.
  • You want to do some custom processing, which you cannot express easily in numpy/pandas/... (Python libraries, which call C) and you want it to be fast. Then you have to hookup Python with C/C++, which is not something completely trivial.

Also in overall architecture, sometimes you want ML predictions as a function call, not as an API call. It simplifies and sometimes speeds up things a lot.

Overall I would say, that Rust should not compete with Python in AI space, but with languages like Java/Scala (which have some ML going with them).

1 Like

I'm not sure if it's exactly what your are looking for but this and the talk from RustFest Type-safe & high-perf distributed actor systems with Rust - YouTube may be of interest.

1 Like