The Rust for Linux project, sponsored by Google, has advanced with use of a beta Rust compiler (as opposed to a nightly build), testing ARM and RISC-V

Latest patches show Rust for Linux project making great strides towards the kernel

submited by
Style Pass
2021-07-06 02:00:07

The Rust for Linux project, sponsored by Google, has advanced with use of a beta Rust compiler (as opposed to a nightly build), testing ARM and RISC-V architecture support, new Rust abstractions, and more.

A new set of patches submitted to the Linux kernel mailing list summarises the progress of the project to enable Rust to be used alongside C for implementing the Linux kernel. The progress is significant.

Project leader Miguel Ojeda is a computer scientist at CERN in Geneva, Switzerland, now working full time on Rust for Linux. In his post, he begun by explaining that infallible allocations have been removed via a customised "alloc" standard library crate. An infallible allocation is where the developer assumes that an allocation of memory will always succeed. If it does not succeed, Rust terminates the process. Infallible allocations are not acceptable in the kernel since failures cause a kernel panic. A fallible allocation lets the developer test for success.

Rust for Linux requires new features in the Rust compiler (rustc) as well as in the kernel code. Therefore, the project has been using nightly releases of rustc. This is no longer necessary as the beta of rustc 1.54 is sufficient. When rustc 1.54 is fully released, it will be the reference compiler for the project.

Leave a Comment