More Rust Code Is Coming For Linux 6.14 Along With Hitting Another "Major Milestone"

Written by Michael Larabel in Linux Kernel on 20 January 2025 at 07:04 AM EST. 21 Comments
LINUX KERNEL
For the Linux 6.13 cycle the Rust code was hitting a "tipping point" with more Rust kernel drivers expected soon. For Linux 6.14 there is indeed a lot more Rust code being primed for this next kernel version.

Rust for Linux lead developer Miguel Ojeda sent out the main set of Rust infrastructure updates overnight for the newly-opened Linux 6.14 merge window. For this next kernel version the Rust developers have finished their migration to custom FFI integer types that were started for Linux 6.13and began making use of derive(CoercePointee) with Rust 1.84 and newer. The derive(CoercePointee) support is considered a "major milestone" on the path to building the Linux kernel only making use of stable Rust features. Miguel explained in the pull request:
"Start to use 'derive(CoercePointee)' on Rust >= 1.84.0.

This is a major milestone on the path to build the kernel using only stable Rust features. In particular, previously we were using the unstable features 'coerce_unsized', 'dispatch_from_dyn' and 'unsize', and now we will use the new 'derive_coerce_pointee' one, which is on track to stabilization. This new feature is a macro that essentially expands into code that internally uses the unstable features that we were using before, without having to expose those."

The Rust code for Linux 6.14 also introduces the "PROCMACROLDFLAGS" environment variable to allow linking Rust proc macros with different flags than those used for linking Rust host programs. There is also work to help Linux kernel builds under macOS while having Rust support enabled, Clippy improvements, and a number of enhancements to the Rust kernel crate.

Rust for Linux logo


Within the Rust pull request for Linux 6.14, it's also noted more Rust code is expected by way of the driver core and Kbuild pull requests among other smaller pull requests also introducing more Rust code to the Linux kernel. Indeed by way of the driver core pull request we are expecting Rust PCI and platform device driver support to land for Linux 6.14.
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