Rust Support In The Linux Kernel Undergoing Another Round Of Discussions

Written by Michael Larabel in Programming on 14 April 2021 at 06:29 PM EDT. 63 Comments
PROGRAMMING
Last month the initial infrastructure for allowing the Rust programming language to be used within the Linux kernel landed in the Linux-Next tree for more widespread testing ahead of its possible inclusion in the mainline kernel. Now a "request for comments" has been started again on the kernel mailing list around the prospects of Rust code for the Linux kernel.

Kernel developer Miguel Ojeda started this latest "RFC" proposal on the Linux kernel mailing list. The lengthy mailing list post outlines the beliefs of the involved developers over adding Rust code to the kernel, the benefits like improved memory safety, and more.

The RFC acknowledges reasons to be against it too like the slower compile times, lack of standardization in some aspects, the existing Linux kernel infrastructure catering to C, and the dependence on LLVM for compiling the Rust code.

The developers for seeing this "second language" in the kernel are hoping it will happen sooner or rather than later. So far the infrastructure is ready for Rust in the Linux kernel with x86_64, ARM64, and PPC64LE. Other architectures and building up of the Rust kernel support will be done incrementally.

See this RFC LKML thread for the lengthy overview on the proposal for adding Rust code to the Linux kernel.

Responses are coming in already on this work, mostly in favor of it. Linus Torvalds himself has also expressed some technical concerns but they do appear to be addressable matters in time. He also added that he would like to see some real Rust example(s) as part of the proposal rather than the current basic modules that aren't too real-world applicable and doing something meaningful.

Given the timing of this RFC and that the Linux kernel merge window is likely kicking off next week (or delayed until the following week if 5.12-rc8 is warranted), it's quite likely we won't see this initial kernel support land for Linux 5.13 especially given Torvalds' initial comments. But we'll see how it plays out and if for Linux 5.14 or another kernel release later this year that we will see this initial Rust infrastructure introduced.
Related News
About The Author
Michael Larabel

Michael Larabel is the principal author of Phoronix.com and founded the site in 2004 with a focus on enriching the Linux hardware experience. Michael has written more than 20,000 articles covering the state of Linux hardware support, Linux performance, graphics drivers, and other topics. Michael is also the lead developer of the Phoronix Test Suite, Phoromatic, and OpenBenchmarking.org automated benchmarking software. He can be followed via Twitter, LinkedIn, or contacted via MichaelLarabel.com.

Popular News This Week