The Rust programming language should end up in the Linux kernel 6.1
In a recent post on the Linux Kernel Mailing List, Linus Torvalds promised “a number of fairly fundamental new things” in the Linux kernel (opens in new tab) 6.1, and the first seems to have appeared: as reported by The registry (opens in new tab)the Rust programming language is supported directly in the operating system.
The news isn’t exactly unexpected since patches to add Rust to Linux have been around for some time Version 9 will be released in August 2022. At the last Open Source Summit, Torvald’s keynote indicated that we should expect Rust to come out in 6.1. Rust currently has one group of developers We are working on support for the Linux kernel and in an October 1st pull request from Kees Cook, which was accepted by Torvalds, we see the first steps towards its inevitable arrival in 6.1.
Adding support for Rust adds about 12,500 lines of code to the Linux kernel, itself written in C, with which Rust has some interoperability. However, GCC, the Gnu Compiler Collection, cannot compile the new language, and Clang, which can, has its own shortcomings if you want to code for architectures other than x86 and ARM. With Rust awaiting official Linux support and an eager community of kernel hackers, it can only be a matter of time before Rust becomes available for more architectures. The new kernel is expected to be available from December this year.
Some developers have already started showing what’s possible with Rust on Linux. Andreas Hindborg, Western Digital’s chief engineer, showed a Rust-written NVMe SSD driver for Linux at the Linux Plumbers Summit 2022, which was dedicated to an entire microconference Rust on Linux.
rust (opens in new tab) is a general-purpose programming language influenced by C++ that was developed in 2006 and reached version 1.0 in 2015. It grew out of a personal project by Mozilla contributor Graydon Hoare and was sponsored by Mozilla until 2020 when the corporate restructuring caused by the Covid pandemic led to the creation of the Rust Foundation in 2021. Amazon Web Services, Huawei, Google, Microsoft, and Mozilla now support the foundation, and Google supports Rust in its Android Open Source Project. The language is notable for its elegance, zero-tolerance approach to memory security, and the speed of its growing popularity.
It is also known as a high-performance language, designed with the intention of combining the flexible syntax of a high-level language with the hardware control and speed of a low-level language. Concurrency is also one of its strengths and its strong memory security – it notably does not include a garbage collector to return memory no longer referenced by a program to the system like C# and Java do. The memory bugs introduced by C programmers could be a thing of the past with Rust’s memory-safe features.