Rust Code Updated For The Linux Kernel - Networking & Async Support Started
The Rust for Linux effort continues running strong with many developers and organizations interested in seeing the ability to begin making use of Rust code in the kernel especially for areas prone to memory safety issues. With the v6 patches out today, the toolchain support has been updated against Rust 1.60, support for running documentation tests in-kernel, and other Rust infrastructure improvements.
When it comes to Rust code usage within the kernel, the start of networking support is found with this patch series. The "net" module has support for types like Namespace, SkBuff, Ipv4Addr, SocketAddrV4, TcpListener, and more. There is also the start of "async" support for asynchronous kernel programming. The current state already is working for allowing asynchronous TCP socket code. The new Rust code also adds support for network packet filters and other new features.
As of this Rust for Linux v6 series, the Rust support is still considered "experimental" but good enough that kernel developers can begin working on Rust abstractions for other kernel subsystems and porting more drivers over to Rust, if desired.
More details on the updated Rust code for the Linux kernel via this patch series. The Rust kernel effort currently amounts to 37.9k lines of code including the infrastructure, subsystem abstractions started so far, sample code, and converting some Android and GPIO driver code to Rust as additional examples.