24 November 2025
When we talk about deploying robots into people's homes (they're coming), reliability is a strict requirement. A household robot has to operate safely. At all times. This is why Rust is the ideal language for the future of robotics.
Much of robotics today is prototyped in Python. Unsurprisingly so, because robotics has become more and more about integrating AI algorithms onto physical systems, which are typically written in Python as well. It's a language that's beloved by scientists for its ease of use, but it's inefficient. Most critically, Python applications struggle with real-time constraints and lack deterministic performance guarantees. Not to mention the dread the GIL instills. So, performance critical parts are (re-)written in C or C++, which brings its own challenges. Subtle pitfalls like undefined behavior, memory management traps, and race conditions in highly parallel code make large robotics codebases difficult to maintain. And worst of all, teams are left juggling two languages.
Rust, designed as a safer systems programming language, is the ultimate choice for robotics. Its performance is on par with C++, but its strict safety guarantees eliminate entire classes of bugs at compile time. Sometimes you'll feel like you're fighting the compiler, but actually, it's helping you write correct code. It's one thing if some application on your PC crashes. But a robot's internal systems crashing? That might lead to physical harm. Rust enables low-level control, with predictable performance patterns, and with an enjoyable API. For nine years in a row, Rust has been voted the most admired language on Stack Overflow.
The main things Rust brings to the table for robotics are its deterministic (but safe) memory model (there's no waiting for garbage collection, but also no use-after-free), its zero-cost abstractions, and the borrow-checker's compile-time concurrency safety.
It's not just hobbyists that love the language. Larger companies and organisations are catching on too. In 2023, Microsoft announced that it was doubling down on Rust. Android supports Rust. And Rust is the first non-C language to be supported by the Linux kernel.
Rust's also no stranger to the AI space. HuggingFace Tokenizers is written in Rust, and they also have an ML framework, Candle. Writing the whole stack in one language is ergonomic. Do you really want to write AI inference code or high-level robot logic in C++? Do you want to write 500 Hz control loops in Python? Rust can easily handle both.
With libraries such as iceoryx2 for inter-process communication, rerun for visualisation and logging, and Copper for robotics runtimes, the future for Rust in robotics looks bright. Even though the ecosystem is not fully there yet, I foresee it growing rapidly in the near future. Knowing Rust will become an asset for roboticists.