Rust Goes Mainstream in the Linux Kernel

Wait 5 sec.

TOKYO —  At the invitation-only Linux Kernel Maintainers Summit here, the top Linux maintainers decided, as Jonathan Corbet, Linux kernel developer, put it, “The consensus among the assembled developers is that Rust in the kernel is no longer experimental — it is now a core part of the kernel and is here to stay. So the ‘experimental ‘ tag will be coming off.” As Linux kernel maintainer Steven Rosted told me, “There was zero pushback.”This has been a long time coming. This shift caps five years of sometimes-fierce debate over whether the memory-safe language belonged alongside C at the heart of the world’s most widely deployed open source operating system.The Signs Were ThereThe signs were there, though, that this step to Rust acceptance was coming. At the recent Linux Foundation Open Source Summit Korea 2025, Torvalds had said, “I think we’ve reached a stage [where] Rust is truly becoming part of the kernel, and it’s no longer just an experimental thing.”No, no, it’s not. It all began when Alex Gaynor and Geoffrey Thomas at the 2019 Linux Security Summit said that about two-thirds of Linux kernel vulnerabilities come from memory safety issues. Rust, in theory, could avoid these by using Rust’s inherently safer application programming interfaces (API).In the subsequent 2020 Linux Plumbers meeting, developer Nelson Elhage, in his summary of the Plumbers’ meeting on Rust in Linux, explained that Linux Rust proponents aren’t “proposing a rewrite of the Linux kernel into Rust; they are focused only on moving toward a world where new code may be written in Rust. The three areas of potential concern for Rust support are making use of the existing APIs in the kernel, architecture support, and dealing with application binary interface (ABI) compatibility between Rust and C.”In the meantime, Miguel Ojeda, a Linux kernel developer, started migrating Linux code from C to Rust. He created the Rust for Linux project to bring out-of-tree Rust modules to Linux in 2019.By early 2021, Rust was, outside the Linux kernel, being brought closer to the world’s favorite operating system. Amazon Web Services (AWS) released Bottlerocket Linux for containers, which was partly Rust-based. At about the same time, Sylvestre Ledru, a Debian Linux developer, ported a Rust version of Coreutils to Linux using the LLVM compiler infrastructure and its Clang C language front-end and tooling infrastructure.Give Rust A ChanceThat March, Linus Torvalds decided to give Rust a chance. He told me at the time, he was in the ‘wait and see’ camp — I’m interested in the project, but I think it’s driven by people who are very excited about Rust, and I want to see how it actually ends up working in practice.”“Personally,” Torvalds added, he’s “in no way “pushing” for Rust, [but] I’m open to it considering the promised advantages and avoiding some safety pitfalls, but I also know that sometimes promises don’t pan out.”As it would turn out, those promises were kept. Backed by financial support from the Internet Security Research Group (ISRG) and Google, on Sept. 20, 2021, Ojeda submitted the first pull request for the Rust for Linux project. This added initial Rust support, including Kbuild integration, initial support for built-in modules, and the beginnings of the kernel crate, with Safe Rust abstractions from Alex Gaynor and Geoffrey Thomas.In those early days, the plan was not to rewrite Linux in Rust; it still isn’t, but to adopt it selectively where it can provide the most security benefit without destabilizing mature C code. In short,  new drivers, subsystems, and helper libraries would be the first targets,It was not an easy journey. As Ojeda said in June 2022, “The kernel is a huge project with a lot of stakeholders. Since the beginning, it was clear that adding a second ‘main’ language to the kernel would have both technical and management challenges.”He would be proven right. Rust adoption in the kernel proved contentious within the kernel community. Some maintainers questioned the cost of mixing programming paradigms in Linux. For example, at the.2021 Kernel Maintainers Summit Video4Linux maintainer Laurent Pinchart said he did not have time to “stop everything and learn Rust anytime soon.”ResistanceWhile Rust began to move in, it still faced resistance. As Dan Williams, senior principal engineer on Intel’s Linux core kernel architecture team, said at the Linux Plumbers 2024 meeting, “Kernel maintainers tend to be very conservative. They know C backward and forward, but they don’t know Rust.” So, they “don’t know how to review this or debug that because they don’t understand the code.”Mind you, they have reasons. In a dispute over how to get Rust to work with the Linux kernel’s Direct Memory Access (DMA) Application Programming Interface (API), the real problem boiled down to, as senior Linux kernel developer Ted T’so observed, maintainers don’t have unlimited time, and they don’t want to increase their “code maintenance burden.”Still, despite the fuss, more and more programs were ported to Rust. By April 2025, the Linux kernel contained about 34 million lines of C code, with only 25 thousand lines written in Rust. At the same time, more and more drivers and higher-level utilities were being written in Rust. For instance, the Debian Linux distro developers announced that going forward, Rust would be a required dependency  in its foundational  Advanced Package Tool (APT),C’s Not Going AnywhereThis change doesn’t mean everyone will need to use Rust. C is not going anywhere. Still, as several maintainers told me, they expect to see many more drivers being written in Rust. In particular, Rust looks especially attractive for “leaf” drivers (network, storage, NVMe, etc.), where the Rust-for-Linux bindings expose safe wrappers over kernel C APIs.Nevertheless, for would-be kernel and systems programmers, Rust’s new status in Linux hints at a career path that blends deep understanding of C with fluency in Rust’s safety guarantees. This combination may define the next generation of low-level development work.The post Rust Goes Mainstream in the Linux Kernel appeared first on The New Stack.