Linux embracing Rust will boost robotics community

0
53


Listen to this article

This week, Linux’s Benevolent Dictator For Life Linus Torvalds mentioned that the Rust programming language would be used in the upcoming Linux 6.1 kernel. Currently, the Linux kernel is at preview version 6.0-rc6 (codenamed “Hurr durr I’ma ninja sloth”) so we have a bit of time before we all have Rust powering the kernel, but the mere announcement is news-worthy. It’s the author’s opinion that this embrace of Rust at the very core of Linux will be a huge boost to the robotics community.

There are a few reasons for my optimism. First, let’s acknowledge that those in charge of the capital-K Linux Kernel have traditionally forbidden the use of any language other than good old-fashioned C; leaving those confines willingly is remarkable. This will do two important things for the community: start to relieve tech’s complete reliance on C as a programming protocol, and invite programmers who are Rust-forward to make a mark on Linux as a whole. After all, this movement has already started as Android incorporated Rust in 2021.

Second, the addition of Rust into the Kernel wasn’t trivial. A laundry list of features was needed to make Rust more secure and functional before it could be trusted at such a low level. However, with these features completed, they can be wrapped into the larger ecosystem, which will make everyone’s lives better. The more use Rust gets in the Kernel, the better Rust as a language will become.

Tying it all together is robotics’ implicit reliance on Linux. Linux has kept up with the times remarkably well and is now used on most smart and autonomous devices. It is and will remain the preferred platform for robotics for the foreseeable future; furthermore, Linux’s adoption of Rust in the Kernel signals that it welcomes a future beyond C and wants to engage the wider community.

rust linux robot

There’s a huge ecosystem of robotics tools and paradigms like ROS and OpenCV that operate best within the Linux ecosystem, and like it or not, most robotics engineers get their start playing around in these sandboxes. Whole companies have based their work on these tools and have done very well for themselves. However, I can attest (anecdotally) that a growing number of engineers in the robotics field are recognizing the need for more powerful, more reliable software and are looking for alternative solutions.

Those that do are turning to Rust more often than not. This has led to a budding robotics ecosystem full of enthusiastic developers who just want to write better tools in the most loved programming language around. As enthusiastic as these developers might be, though, these tools by and large aren’t ready for prime-time. They are missing features that most engineers take for granted, or haven’t been used enough to be trusted by the larger community.

This means many older robotics companies are still playing it safe, still working in the sandbox full of familiar software. Some are simply loath to leave the comfort of C++, or Python, or whatever the senior engineer on staff believes is the Right Language. It’s certainly still early days for Rust in robotics, and it takes an enterprising team to take it on. Yet those that have ventured out beyond the familiar and invested the time have been rewarded for their efforts with better products. In fact, for the newest generation of engineers, Rust is the familiar. And that’s great news. 

Between old tools, new programming languages, and the rise of automation, robotics is in a time of change. The inclusion of Rust into the Linux Kernel might seem like a small detail, but it couldn’t have come at a better time. The robotics community has been pushing Rust development for years now; for Linux to support, and be supported by, these efforts is a tide that lifts all boats.

For the curious: survey a full catalog of open-source robotics solutions in Rust at https://robotics.rs/

brandon minor

About the Author

Brandon Minor is the founder and CEO of Tangram Vision, a sensor fusion company. The Tangram Vision Platform approaches sensors holistically, knitting together LiDAR, CMOS, IMU and depth data all at once. This allows users to stop dealing with sensor support over and over, and instead focus on building what makes their product stand out.