Updated Rust Code For Linux Kernel Patches Posted

Written by Michael Larabel in Linux Kernel on 6 December 2021 at 09:30 AM EST. 69 Comments
LINUX KERNEL
In 2022 we will very likely see the experimental Rust programming language support within the Linux kernel mainlined. Sent out this morning were the updated patches introducing the initial support and infrastructure around handling of Rust within the kernel.

This summer saw the earlier patch series posted for review and discussion around introducing Rust programming language support in the Linux kernel to complement its longstanding C focus. In the months since there has been more progress on enabling Rust for the Linux kernel development, Linus Torvalds is not opposed to it, and others getting onboard with the effort. Rust for the Linux kernel remains of increasing interest to developers over security concerns with Rust affording more memory safety protections, potentially lowering the barrier to contributing to the kernel, and other related benefits.

A few minutes ago Miguel Ojeda sent out the "v2" patches for Rust support in the kernel. With these updated packages, the Rust code is now relying on stable Rust releases rather than the beta compiler state previously, new modularization options added, stricter code enforcements, extra Rust compiler diagnostics enabled, new abstractions for in-kernel use, and other low-level code improvements.

Red Hat is also now joining Arm, Google, and Microsoft in voicing their support for Rust code within the Linux kernel.


The Rust support for the Linux kernel in its updated form is around 32k lines of new code, including documentation, sample Rust code, and the associated infrastructure.

The new patch series can be found on the LKML for review and discussion. We'll see how this revision is taken by other upstream developers and with some luck in the coming months we will see this preliminary support mainlined. As with most kernel additions, the support is configurable at build-time if still wanting to compile a future Linux kernel build without this complementary Rust support.
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