Linus Torvalds has not ruled out the possibility of integrating Rust support into the Linux kernel 5.20

At the ongoing Open-Source Summit 2022, during the Q&A session, Linus Torvalds mentioned the potential for a swift integration of components for developing device drivers in Rust into the Linux kernel. It is possible that patches supporting Rust will be accepted in the upcoming merge window, which will form the composition of kernel 5.20, slated for the end of September.

A request to include changes in the kernel has not yet been sent to Torvalds, but the set of patches has undergone additional review, has been stripped of major issues, has been tested in the linux-next branch for quite some time, and has reached a state suitable for creating abstraction layers over kernel subsystems, writing drivers and modules. Rust support is presented as an option, not active by default and not leading to the inclusion of Rust as a mandatory build dependency for the kernel.

The proposed changes allow the use of Rust as a second language for developing drivers and kernel modules. Using Rust for driver development will enable the creation of safe and higher-quality drivers with minimal effort, eliminating issues such as accessing memory after it has been freed, dereferencing null pointers, and buffer overflows.

Safe memory handling in Rust is ensured at compile time through reference checking, ownership tracking of objects, and considerations of object lifetimes (scope), as well as runtime checks for correctness in memory access. Rust also provides protections against integer overflows, requires variables to be initialized before use, manages errors more effectively in the standard library, employs immutability by default for references and variables, and offers strong static typing to minimize logical errors.

Source: opennet.ru

Buy reliable website hosting with DDoS protection, VPS VDS servers 🔥 Buy reliable website hosting with DDoS protection, VPS VDS servers | ProHoster