Linus Torvalds has accepted changes into the Linux 6.1 kernel branch that implement the ability to use the Rust programming language as a secondary language for developing drivers and kernel modules. The patches were accepted after a year and a half of testing in the linux-next branch and addressing the feedback received. The release of kernel 6.1 is expected in December. The main motivation for supporting Rust is to simplify writing safe and high-quality device drivers by reducing the likelihood of memory errors. Rust support is not enabled by default and does not make Rust a mandatory build dependency for the kernel.
Currently, a minimal trimmed version of the patches has been accepted into the kernel, reduced from 40,000 to 13,000 lines of code, providing only the necessary minimum sufficient for compiling a simple kernel module written in Rust. There are plans to gradually increase the existing functionality by transferring other changes from the Rust-for-Linux branch. Simultaneously, projects are developing the proposed infrastructure for Rust-based driver development for NVMe storage devices, the 9p network protocol, and the Apple M1 GPU.
Source: opennet.ru
