Rust for Linux

From Wikipedia, the free encyclopedia
Jump to navigation Jump to search
Rust for Linux
Developers
  • Community contributors
  • Miguel Ojeda
Initial releaseOctober 1, 2022; 3 years ago (2022-10-01)
Repositorygithub.com/Rust-for-Linux/linux
Written inRust
Engine
    Lua error in Module:EditAtWikidata at line 29: attempt to index field 'wikibase' (a nil value).
    Operating systemLinux
    Available inEnglish
    LicenseGPL-2.0-only with Linux-syscall-note.
    Websitehttps://rust-for-linux.com/

    Rust for Linux is an ongoing project started in 2020 to add Rust as a programming language that can be used within the Linux kernel software, which has been written using C and assembly only. This project aims to leverage Rust's memory safety to reduce bugs when writing kernel drivers.[1] Progress has been slower than hoped by both Rust advocates and Linus Torvalds, lead of the Linux kernel project.[2] In December 2023, the first drivers written in Rust were accepted, and released in version 6.8.[3][4] In December 2025, it was announced that Rust in the Linux kernel is no longer experimental.[5]

    History

    [edit | edit source]

    The Linux kernel has been primarily written in C and assembly languages since its first release in 1991. Around 1997, the addition of C++ was considered and experimented upon for two weeks before being scrapped.[6] 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.[7]

    An example Linux external loadable kernel module created using the Rust language was published by Taesoo Kim in 2013.[8][9]

    The Rust for Linux project was announced in 2020 in the Linux kernel mailing list with goal of adding Rust as a programming language that could be used within the Linux project.[10] 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.[11] 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."[12][13] 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".[14]

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

    Rust for Linux developers created a new library "pinned-init" to safely and fallibly initialize memory that must not be relocated.[3] It was first included in Linux 6.4,[17] and been improved in later versions.[3]

    Linux 6.10 included RISC-V processor architecture support for Rust.[18]

    In July 2024 a change was accepted into Linux to support multiple Rust versions for the first time, allowing compiling using both 1.78 (Released 2 May, 2024) and 1.79 (Released 13 June, 2024).[19]

    As of August 2024, Rust for Linux depends on unstable features of the Rust compiler.[1]

    In December 2025, during the Linux Kernel Developers Summit, it was decided to promote Rust from experimental to a core part of the kernel.[5] This expands the core languages in the Linux kernel to C, assembly and Rust.

    Usage

    [edit | edit source]

    Linux kernel contains the following Rust components:


    Other notable projects using Rust in Linux include:

    See also

    [edit | edit source]

    References

    [edit | edit source]
    1. ^ a b Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    2. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    3. ^ a b c d e f g h i j Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    4. ^ a b Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    5. ^ a b Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    6. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    7. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    8. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    9. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    10. ^ a b Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    11. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    12. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    13. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    14. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    15. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    16. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    17. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    18. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    19. ^ a b Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    20. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    21. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    22. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    23. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    24. ^ a b c Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    25. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    26. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    27. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    28. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    29. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).
    30. ^ Lua error in Module:Citation/CS1/Configuration at line 2172: attempt to index field '?' (a nil value).