The Rust in Linux debate is over. Implementation has started. In an e-mail conversation, the creator of Linux, Linus Torvalds, told me: “Unless something strange happens, it [Rust] will turn it into 6.1.”
The Rust programming language coming into the Linux kernel has been around for quite some time. At the Linux Plumbers Conference 2020, developers began considering using the Rust language for new Linux online code. Google, which supports Rust for Android development – itself a Linux distribution – began pushing for Rust in the Linux kernel in April 2021.
As Wedson Almeida Filho of Google’s Android team said at the time, “We believe that Rust is now ready to join C as a practical language for kernel implementation. This can help us reduce the number of potential bugs and security vulnerabilities in privileged code while playing well with the core core and preserving its performance characteristics.”
It took time to convince the best Linux kernel developers of this. There were concerns that non-standard Rust extensions were needed to make it work on Linux. For example, with the new Rust Linux NVMe driver, over 70 extensions had to be added to Rust to make it work. But, Torvalds had told me in an earlier interview, “We’ve been using exceptions to the C standard for decades.”
Also: Linus Torvalds talks about Rust on Linux, his schedule and life with his MacBook Air M2
This was always a problem at the invite-only Linux Kernel Maintainer Summit. But, in the end, it was decided that Rust was well enough supported in the Clang – the C-family compiler front-end – to move forward. Also, as Torvalds had said earlier, “Clang works, so merging Rust would probably help and not hurt the kernel.”
At the meeting, Torvalds said, “There was some debate at the maintainer summit, but it was mostly about the issue of compiler versions. Which isn’t new to Rust (we already have all the problem on many different compiler versions, and gcc versus clang).
It also helped the case of Rust which – thanks to the groundbreaking work of the Linux kernel and Rust developer Miguel Ojeda – Rust on Linux has become much more mature. Additionally, Western Digital Principal Engineer Andreas Hindborg at the Linux Plumbers Summit 2022 showed that you can write a top notch driver, an NVM-Express (NVMe) SSD driver for Linux in Rust. The maintainers were convinced that it was time to move forward with Rust on Linux. In short, they agreed that Rust on Linux was ready to go.
Now, warns Torvalds in this first release, Rust “will just have the basic infrastructure (i.e. no serious use cases yet)”. But, it’s still a major first step for Rust and Linux.