Miguel Okting ( Miguel Ojeda ), the author of the project rust-for-linux , suggested For consideration by the developers of the Linux kernel, the production of the V5 components To develop device drivers in the RUST language. This is the sixth edition of the patches taking into account the first option published without the version number. RUST support is considered as experimental, but already included in the Linux-Next branch and is sufficiently developed to start working on creating a layer of abstraction over the core subsystems, as well as to write drivers and modules. The development is funded by Google and the ISRG organization (Internet Security Research Group), which is the founder of the LET’s Encrypt project and contributes to the promotion of HTTPS and the development of technologies to increase the security of the Internet.
Recall that the proposed changes make it possible to use Rust as a second language to develop drivers and kernel modules. Support RUST is presented as an option that is not active by default and does not turn on Rust to the number of mandatory assembly dependences to the kernel. Using the RUST to develop drivers will allow with minimal efforts to create safe and better drivers who are eliminated from such problems as an appeal to the memory area after its release, the gathering of zero pointers and the border of the buffer.
Safe memory work is provided in Rust during compilation through checks, tracking objects and accounting of object lifetime (area of visibility), as well as via the accuracy of memory access values during the code execution. Rust also provides tools to protect from integer overflows, requires mandatory initialization of variable values before use, better handles errors in the standard library, applies the concept of immutability (Immutable) of references and default variables, offers strong static typing to minimize logical errors.
In the new version of patches, the removal of the comments expressed in the process of discussion of the first, second, third, fourth and fifth editions of the patches. In the new version:
- Toolkit updated to release Rust 1.59.0. The new version of the RUST is also synchronized by the option of the Alloc library, saved from possible generations of the “PANIC” state when errors occur, such as a shortage of memory. Stabilized the possibility of using assembler inserts (“Feature (Global_ASM)”).
- Added support for creating in the language of Rust host programs , used in the process of compilation kernel.
- Instead of delivery of predetermined files with target platform specification, their dynamic generation based on the kernel configuration is provided.
- Added parameter of the HAVE_RUST kernel, included for architectures on which Rust is supported.
- Abstractions are proposed for use in the code in the language of the hardware generator of pseudo-random numbers.