A Significant Amount of Rust Code Set to Join the Linux 6.18 Kernel

This article is from Phoronix

Following the release of Linux version 6.17 yesterday, the merge window for the Linux 6.18 kernel has officially opened, and one thing is already quite clear: a significant amount of new Rust programming language code is set to enter the Linux 6.18 kernel.

Before the official opening of the Linux 6.18 merge window, several early pull requests have already been submitted, including some specifically aimed at enhancing kernel support for the Rust programming language.

Rusty Tux

Among these early pull requests, Miguel Ojeda submitted the main Rust pull request. The Rust integration in Linux 6.18 will derive “zeroable” for all structs and unions generated by bindgen. This kernel crate adds a module named “ptr” with an “Alignment” type, continues to use the Rust standard library within the kernel, and includes several other new features.

Pull requests related to the driver core have also been submitted, primarily featuring changes in Rust. The new Rust code includes support for simple read/write files and custom callbacks for DebugFS, the addition of the io::poll module, support for threaded and non-threaded device interrupt requests (IRQ), multiple new PCI additions, enhancements to sysfs integration, and various other Rust driver changes.

In terms of lock management, pull requests have added preliminary support for generic LKMM atomic variables. Additionally, a refcount_t wrapper has been introduced in Rust. As mentioned a few weeks ago, this will allow Rust and C code to use the same memory model in the future.

Furthermore, more Rust code submissions from the DRM subsystem and other pull requests are expected in the next two weeks.

Leave a Comment