Linus Torvalds did not rule out the possibility of integrating Rust support into the Linux 5.20 kernel

At the Open-Source Summit 2022 conference taking place these days, in the question and answer section, Linus Torvalds mentioned the possibility of soon integrating components into the Linux kernel for developing device drivers in the Rust language. It is possible that patches with Rust support will be accepted in the next change acceptance window, forming the composition of the 5.20 kernel, scheduled for the end of September.

The 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 freed from major comments, has been tested in the linux-next branch for quite some time and has been brought to a state suitable for creating abstraction layers over kernel subsystems, writing drivers and modules. Rust support is presented as an option that is not enabled by default and does not result in Rust being included as a required build dependency for the kernel.

The proposed changes make it possible to use Rust as a second language for developing drivers and kernel modules. Using Rust for driver development will allow you to create safer and better drivers with minimal effort, free from problems such as memory access after freeing, null pointer dereferences, and buffer overruns.

Memory-safe handling is provided in Rust at compile time through reference checking, keeping track of object ownership and object lifetime (scope), as well as through evaluation of the correctness of memory access during code execution. Rust also provides protection against integer overflows, requires mandatory initialization of variable values ​​before use, handles errors better in the standard library, applies the concept of immutable references and variables by default, offers strong static typing to minimize logical errors.

Source: opennet.ru

Add a comment