New to Rust, want to know what to focus on for AI and Robotics

I've learned the basics of Rust (ownership, borrowing, structs, enums, error handling with Result). Now I want to use Rust for two things:

  1. AI / machine learning
  2. Robotics (Arduino, ESP32, and eventually more advanced hardware)

I don't want to study random parts of Rust that I'll never use for these two goals. I'd rather know the specific concepts, crates (libraries), or areas to go deep on for each one, and skip what's not relevant.

Can anyone who has done AI or robotics/embedded work in Rust point me toward:

  • What to learn next after the basics
  • Which crates/libraries are actually used for this in real projects
  • Any common beginner mistakes or wasted time to avoid

Thank you!

For ML, many crates are listed at arewelearningyet.
E.g. see burn and candle - both actively developed.

Rust is great for ML if you are working from 1st principles, but it is a much smaller ecosystem than python.

I don't know about embedded, but I created AI back then with Rust, it was object detection for my univercity homework :v

My list is :

  • Tokio -> to provide the network API
  • Ort -> ONNX runtime
  • Tch-RS -> binding for C++ Libtorch (the engine of Python's PyTorch library)
  • Candle -> low level pure Rust library, alternative of C++ Libtorch
  • Mistral.rs -> a more high level library on top of Candle
  • Tokenizers, TikToken -> tokenizer

If you want to use Rust in Google Colab for faster processing because there is GPU there. I have the tested ready to use Notebook here :

Remove my custom model cells :< it was me trying to create custom model but got error because I confused about the documentation:<

You could study existing libraries:

https://lib.rs/keywords/esp32

For low level programming you may need to learn more about unsafe if you need to interact directly with the hardware. However, there are existing hardware abstraction libraries, so you may not even need to do very low level programming yourself.

I work on AI + Robotics + Embedded. Each of them is a very broad field. Thus, it is hard to point to any crate in particular; there are hundreds of crates, each with its pros and cons, and depending on your needs, a niche crate may be more suitable than a popular one. In general, I would say: start with a project that interest you and use lib.rs to narrow down candidate crates. Maybe if you share what you have in mind (your interests, a project), people may be able to give more relevant recommendations.

Anyway, you mentioned ESP32: You could start with Rust on ESP book . You may learn a lot on how Rust + Embedded work together. Note that Espressif is one of the few companies offering official supported Rust HAL on its MCUs.

Note: the above post was flagged as LLM generated, but it was actually written by me (my own thoughts, with my human fingers typing on a keyboard). Granted, it does look like an LLM output. It is just how I write (sometimes, I also add emojis here and there). Thanks to the mods though, telling what is AI-slop and what is human is sometimes hard.