Rust for Linux explained

Rust for Linux
Developer:
  • Community contributors
  • Miguel Ojeda
Programming Language:Rust
Language:English
License:GPL-2.0-only with Linux-syscall-note.
Website:https://rust-for-linux.com/

Rust for Linux is a series of patches to the Linux kernel that adds Rust as a second programming language to C for writing kernel components.

History

The Linux kernel has been primarily written in C and assembly language since its first release in 1991. Around 1997, the addition of C++ was considered and experimented upon for two weeks before being scrapped.[1] Rust was created in 2006 and combines the performance of low-level programming languages (such as C) with a focus on memory safety and a user-friendly tool set and syntax.[2]

The Rust for Linux project was announced in 2020 in the Linux kernel mailing list with goals of leveraging Rust's memory safety to reduce bugs when writing kernel drivers.[3] At the Open Source Summit 2022, Linus Torvalds stated that the incorporation of the project's work could begin as soon as the Linux 5.20 release, later named as Linux 6.0.[4] The first release candidate for Linux 6.0 was created on 14 August 2022, without Rust support. In the release notes for Linux 6.0-rc1, Torvalds expressed his intention for adding Rust support, "I actually was hoping that we'd get some of the first rust infrastructure, and the multi-gen LRU VM, but neither of them happened this time around."[5] [6] On 19 September 2022, an article from ZDNet revealed an email from Linus Torvalds stating that "Unless something odd happens, it [Rust] will make it into 6.1".[7]

In October 2022, a pull request for accepting the implementation for Rust for Linux was approved by Torvalds.[8] As of Linux 6.1, support was intentionally left minimal in order to allow developers to test the feature.[9]

Notes and References

  1. Web site: Claburn . Thomas . Linus Torvalds says Rust is coming to the Linux kernel . 2022-06-23 . 2022-07-25 . . en . 2022-07-28 . https://web.archive.org/web/20220728221531/https://www.theregister.com/2022/06/23/linus_torvalds_rust_linux_kernel/ . live .
  2. Perkel . Jeffrey M. . 2020-12-01 . Why scientists are turning to Rust . . en . 588 . 7836 . 185–186 . 10.1038/d41586-020-03382-2 . 33262490 . 2020Natur.588..185P . 227251258 . 2022-08-04 . 2022-05-06 . https://web.archive.org/web/20220506040523/https://www.nature.com/articles/d41586-020-03382-2 . live .
  3. Web site: Sergio De . Simone . Using Rust to Write Safe and Correct Linux Kernel Drivers . 2021-04-27 . 2022-08-04 . InfoQ . en . 2022-09-22 . https://web.archive.org/web/20220922094134/https://www.infoq.com/news/2021/04/rust-linux-kernel-development/ . live .
  4. Web site: Steven . Vaughan-Nichols . Linus Torvalds is cautiously optimistic about bringing Rust into Linux kernel's next release . 2022-06-27 . 2022-08-04 . . en . 2022-08-12 . https://web.archive.org/web/20220812183421/https://www.zdnet.com/article/linus-torvalds-is-cautiously-optimistic-about-bringing-rust-into-the-linux-kernels-next-release/ . live .
  5. Web site: Liam . Tung . Linux 6.0 arrives with performance improvements and more Rust coming . 2022-08-15 . 2022-09-07 . . en . 2022-09-07 . https://web.archive.org/web/20220907042936/https://www.zdnet.com/article/linux-6-0-arrives-with-performance-improvements-and-more-rust-coming/ . live .
  6. Web site: Linus . Torvalds . Linux 6.0-rc1 . 2022-08-14 . 2022-09-07 . LWN.net.
  7. Web site: Steven . Vaughan-Nichols . 2022-09-19 . Linus Torvalds: Rust will go into Linux 6.1 . 2022-09-20 . ZDNET . en . 2023-01-19 . https://web.archive.org/web/20230119081543/https://www.zdnet.com/article/linus-torvalds-rust-will-go-into-linux-6-1/ . live .
  8. Web site: Proven . Liam . Linux 6.1: Rust to hit mainline kernel . 2022-10-05 . 2022-10-12 . The Register . en . 2022-10-12 . https://web.archive.org/web/20221012065118/https://www.theregister.com/2022/10/05/rust_kernel_pull_request_pulled/ . live .
  9. Web site: Corbet . Jonathan . Next steps for Rust in the kernel . . 2023-05-03 . 2023-06-08 . https://web.archive.org/web/20230608001707/https://lwn.net/Articles/908347/ . live .