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.
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.