Rust Is Now Permanent in Linux Kernel: The End of the Experiment and the Beginning of a New Era
Hello HaWkers, a historic decision was made at the 2025 Kernel Maintainer Summit in Tokyo: the use of Rust in the Linux Kernel is no longer experimental. Rust is now an officially supported and permanent language in the most important open source software project.
This change has profound implications for security, driver development, and the future of systems programming.
The Official Announcement
Miguel Ojeda, leader of the Rust for Linux project, confirmed the decision:
"The experiment is done. Rust is here to stay."
This statement marks the end of years of debates and proofs of concept. Rust went from "let's see if it works" to "this is one of our official languages".
What This Means in Practice
Before (experimental):
- Rust was optional and disabled by default
- Few drivers used Rust
- Limited architecture support
- Uncertainty about the future
Now (permanent):
- Rust is an official option for new drivers
- Subsystems can require Rust
- Long-term investment guaranteed
- Dedicated tooling ecosystem
Why Rust in the Kernel Is Important
The Memory Bug Problem
Studies show that most vulnerabilities in operating systems are caused by memory issues:
Linux bug statistics:
- 65-70% of vulnerabilities are memory-related
- Buffer overflows, use-after-free, double-free
- Bugs that C allows but Rust prevents by design
Types of bugs Rust eliminates:
- Buffer overflow
- Use after free
- Double free
- Data races
- Null pointer dereference
Rust Prevents by Design
// Example of how Rust prevents common bugs
// In C, this compiles but causes use-after-free:
// char* ptr = malloc(100);
// free(ptr);
// strcpy(ptr, "data"); // BUG! Memory already freed
// In Rust, this DOES NOT COMPILE:
fn safe_example() {
let data = String::from("test");
let reference = &data;
drop(data); // Try to free 'data'
// COMPILATION ERROR: 'data' was moved/freed
// but 'reference' still exists
// println!("{}", reference); // Doesn't compile!
}
// The correct version in Rust:
fn correct_example() {
let data = String::from("test");
println!("{}", data);
// 'data' is automatically freed here
// safely
}The Rust compiler ensures these errors are detected at compile time, not in production.
Practical Results in the Kernel
Rust Drivers in Production
Greg Kroah-Hartman, one of the main kernel maintainers, reported positive results:
Observations:
- Rust drivers are proving to be safer
- Rust/C interaction problems were fewer than expected
- Developers are adapting well
The DRM Subsystem
Dave Airlie, DRM (Direct Rendering Manager - graphics system) maintainer, made a significant announcement:
"The DRM project is about a year away from requiring Rust and disallowing C for new drivers."
This means that in 2026-2027, new GPU drivers for Linux may be mandatory in Rust.
Existing Drivers in Rust
Drivers in development/production:
- Apple M1/M2 GPU (Asahi Linux)
- Some network drivers
- Experimental block drivers
- Subsystem bindings
How to Write a Driver in Rust
Basic Structure
// Simplified example of kernel module in Rust
use kernel::prelude::*;
use kernel::miscdev::Registration;
module! {
type: MyDriver,
name: "my_driver",
author: "Developer",
description: "Example driver in Rust",
license: "GPL",
}
struct MyDriver {
_registration: Pin<Box<Registration<Self>>>,
}
impl kernel::Module for MyDriver {
fn init(_name: &'static CStr, _module: &'static ThisModule) -> Result<Self> {
pr_info!("Rust driver initialized!\n");
let registration = Registration::new_pinned(
c_str!("my_device"),
(),
)?;
Ok(MyDriver {
_registration: registration,
})
}
}
impl Drop for MyDriver {
fn drop(&mut self) {
pr_info!("Rust driver finalized!\n");
}
}Interoperability with C
// Calling existing C functions from the kernel
use kernel::bindings;
fn use_c_function() -> Result {
// Safe wrapper around C function
// Rust ensures we call correctly
// SAFETY: we document why this is safe
unsafe {
bindings::some_kernel_c_function();
}
Ok(())
}
Challenges and Next Steps
Remaining Challenges
Toolchain:
- Rust needs to be installed to compile kernel
- Specific compiler version required
- Not all architectures supported yet
Learning:
- C developers need to learn Rust
- New code patterns
- Different debugging practices
Supported Architectures
Fully supported:
- x86_64
- ARM64
- LoongArch
- RISC-V (in progress)
In development:
- ARM 32-bit
- PowerPC
- MIPS
Project Roadmap
2025-2026:
- More production drivers in Rust
- Better documentation
- More subsystem bindings
2026-2027:
- DRM possibly requiring Rust
- New subsystems choosing Rust
- Rust as default for some driver types
Industry Impact
Companies Investing in Rust
Who is contributing:
- Google (Android, Chrome OS)
- Microsoft (Windows drivers)
- Samsung (mobile devices)
- Arm (SoC drivers)
- Red Hat (enterprise infrastructure)
Developer Demand
Rust adoption in the kernel increases demand for professionals:
Valued skills:
- Rust + kernel knowledge
- Rust/C interoperability
- Driver development
- Systems security
Salary ranges (USA):
- Kernel Developer (Rust): $180k - $300k
- Systems Engineer (Rust): $150k - $250k
- Driver Developer (Rust): $140k - $220k
How to Get Started with Rust in the Kernel
Prerequisites
# 1. Install Rust
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
# 2. Add required components
rustup component add rust-src
rustup component add llvm-tools-preview
# 3. Clone the kernel
git clone https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git
# 4. Configure with Rust support
cd linux
make LLVM=1 rustavailable
make LLVM=1 menuconfig
# Enable: General setup -> Rust supportLearning Resources
Official documentation:
- rust-for-linux.com
- Documentation in kernel source
- Mailing list: rust-for-linux@vger.kernel.org
Practical examples:
- Asahi Linux (M1 GPU driver)
- Example drivers in kernel
- Rust book (for fundamentals)
Reflection: What This Means for the Future
The decision to make Rust permanent in Linux is more than technical - it's philosophical. It means:
💡 Insight: The world's most important free software project recognized that C alone is not sufficient for modern security challenges.
Domino Effect
If Linux permanently adopted Rust, other projects will follow:
Projects observing:
- FreeBSD (already experimenting)
- Other Unix-like kernels
- Embedded systems
- Device firmware
Conclusion
The permanent adoption of Rust in the Linux Kernel marks a historic moment in the evolution of systems programming. It's no longer a question of "if" Rust will be relevant for systems - it's a question of "how" we will adapt.
For developers interested in systems, kernel, and security, learning Rust is no longer optional. And for the ecosystem as a whole, this means safer and more reliable systems in the future.
If you're interested in how Rust is transforming the industry, I recommend checking out another article: Microsoft Wants to Eliminate All C and C++ Code by 2030 Using Rust and AI where you'll discover how other giants are following the same path.

