The Linux-Next Kernel Finally Gets a Bit "Rusty"

By

Rust is finally coming to the Linux kernel, by way of Linux-Next, which has many developers cheering.

Linux developers have long-discussed the inclusion of Rust into the kernel for areas that require a certain level of security, specifically device drivers. Rust's memory safety features are quite appealing, so it's obvious why developers might want to use the language with the kernel. However, there's a problem. The Rust compiler is based on LLVM, whereas the traditional compiler used for the Linux kernel is based on GCC. This means Rust supports fewer architectures, which would limit Linux kernel deployments.

To get around this issue (at least initially), the developers have said Rust would be used for writing device drivers that would never be used on obscure architectures. To this, Miguel Ojeda (who maintains the Rust-for-Linux project) said, "This does not mean we will make it into mainline, of course, but it is a nice step to make things as smooth as possible."

Device drivers aren't the only application of Rust to be found in major Linux projects. In fact, Amazon wrote nearly all first-party components for their Bottlerocket container-specific OS in Rust. The reason for this is the same reason developers want to get Rust into the Linux kernel—security.

The inclusion of Rust into Linux-Next only implies readiness for the upcoming merge window. The code has not been widely reviewed (as of yet), but this is a first step for the Linux kernel to gain serious security within the realm of device drivers.

Find out more about this announcement on the LWN.net site.

03/22/2021

Related content

comments powered by Disqus