Rust integration in the Linux kernel
Rust has transitioned to a permanent production subsystem in the Linux kernel after years of experimental status. While memory safety issues cause 70% of serious security bugs, developers face challenges porting drivers from C to Rust due to complex setup requirements.
The transition to production status
C has run Linux for 30 years. Rust entered the kernel in 2022 as the first language besides C and assembly to join the core. The Rust-for-Linux project began in 2020, but it remained in an experimental mode for years. This status was defined by an EXPERIMENTAL configuration flag. The 2025 Linux Kernel Maintainers Summit marked a change when kernel developers decided to drop the experimental label, which makes Rust a permanent, production subsystem rather than a restricted sandbox for code that only works in isolated environments. Since 2022, developers upstreamed more than 20,000 lines of Rust code. In December 2023, the 6.8 kernel release included the first drivers written in Rust.
Microsoft and the Linux community agree that two-thirds or more of security vulnerabilities stem from memory-safety issues. This industry consensus exists because memory errors remain a consequential problem. Google swapped a C-based Binder driver for a Rust version in October. 70% of serious security bugs trace back to memory safety, according to Microsoft, Google, and the U.S. Cybersecurity and Infrastructure Security Agency.
Hardware driver progress and development costs
Linux developers target drivers because they act as leaves in the code tree. These modules interface with only one other part of the system through a set of API functions. This isolation makes drivers the easiest part of the codebase to begin rewriting.
| Feature | Kernel Version | Implementation |
|---|---|---|
| Asahi GPU Driver | 6.17 | Devicetree schema support |
| Tyr (ARM Mali) | 6.18 | GNOME and game support |
| Nova (NVIDIA) | 6.19 | GSP-based enablement |
| First Rust Drivers | 6.8 | December 2023 merge |
The migration of drivers from C to Rust remains a difficult task. One team spent six weeks to port four drivers from C to Rust. During their work, they measured setup times for kernel modules. An average setup took 4.2 hours. A senior engineer completed the same task in 1.8 hours. You know how a single kernel-level fault can crash an entire system.
Developers often struggle with Makefiles and Kbuild configurations when they try to use Cargo. One engineer reported that his initial setup for a Rust kernel module took three days. He encountered issues with LLVM environment variables and panic handlers. After adopting a specialized template, the team saw code review comments drop by 37% over eight weeks. This template includes KUnit integration to map Rust tests to the kernel test suite. It also automates the generation of rust-project.json for rust-analyzer support.
The scale of the job makes a full transition unlikely in the short term. Most drivers will continue to rely on C interfaces for a long time. Rust can interface with existing C function APIs using its "unsafe" modifier. This hybrid model allows for gradual adoption without requiring a total rewrite of the driver mountain.
Safety models and enterprise stability
Memory safety issues account for 70% of serious security bugs. C requires perfect human execution to avoid these flaws. Rust uses an ownership model that functions like a strict code reviewer within the compiler. This model catches errors on the developer machine before they reach production.
The use of Rust provides a solution to the problem of memory-safe programming. Many developers worry about the lack of maturity in the Rust toolchain. However, Google uses Rust drivers on billions of devices. One engineer reported zero panics in 14 months of production after using a specialized template.
The complexity of the Linux kernel makes it more difficult to manage than a project like Firefox. In Firefox, developers replaced core parts with Rust relatively quickly. In the kernel, the sheer scale of the driver mountain makes a full transition nearly impossible. The work focuses on the parts that talk to external systems. The industry faces a chicken and egg problem with universities and companies. Many companies remain resistant to change because they have trillions of dollars vested in old languages and code. It may take a couple of generations to gain the momentum needed to overturn all the precedents. Rust lowers the barrier for entry by providing Cargo and clear compiler messages. This makes it easier for backend developers to contribute to kernel-level work without years of pointer-management experience.
Will the massive scale of the Linux codebase prevent a wider adoption of Rust?