Rust in Linux Kernel Declared a Success: What This Means for the Future

At the 2025 Linux Kernel Maintainers Summit, developers held a session to evaluate the experimental inclusion of Rust code in the Linux kernel. The conclusion: the Rust experiment is officially a success. This landmark decision paves the way for broader adoption of Rust in kernel development and marks a significant evolution in how the Linux kernel is built.

The Journey to Rust in the Kernel

The ability to write kernel code in Rust was first merged into Linux 6.1 in late 2022 as an explicit experiment. The goals were to:

  • Evaluate whether Rust could work alongside C in the kernel
  • Test the infrastructure for building Rust kernel modules
  • Assess the learning curve for kernel developers
  • Measure the impact on kernel stability and security

After more than two years of real-world testing, the experiment has proven its value.

Why Rust in the Kernel?

Rust offers several advantages for kernel development:

Memory Safety

Memory safety bugs account for approximately 70% of all security vulnerabilities in systems software. Rust eliminates entire classes of bugs:

  • Use-after-free – Prevented by ownership system
  • Buffer overflows – Bounds checking by default
  • Null pointer dereferences – Option types instead of null
  • Data races – Prevented at compile time
  • Double-free – Impossible with ownership model

Zero-Cost Abstractions

Rust high-level features compile down to efficient machine code, matching or exceeding C performance while providing:

  • Generics and traits (like C++ templates but safer)
  • Pattern matching
  • Strong type system
  • Functional programming features

Modern Tooling

Rust brings modern development tools to kernel development:

  • Cargo – Dependency management (adapted for kernel use)
  • rustdoc – Built-in documentation generation
  • clippy – Linting and code quality checks
  • rustfmt – Automatic code formatting

Current Rust Kernel Projects

Several kernel subsystems now have Rust implementations:

Apple M-Series GPU Driver

The Asahi Linux project has developed a Rust-based driver for Apple Silicon GPUs. This complex driver demonstrates Rust capabilities for real-world kernel development.

Android Binder

Google has been working on Rust implementations of Android kernel components, including experiments with the Binder IPC mechanism.

File Systems

Work is ongoing on Rust-based filesystem drivers, with potential benefits for security-critical storage code.

Network Drivers

Several network driver prototypes exist, showcasing Rust ability to handle performance-critical networking code.

What This Means for Linux Users

For end users, Rust in the kernel means:

  1. Better Security – Fewer memory-related vulnerabilities in drivers
  2. Improved Stability – Certain crash classes become impossible
  3. Faster Driver Development – Safer experimentation for new hardware
  4. Modern Hardware Support – Like the Apple GPU driver mentioned above

What This Means for Kernel Developers

For those contributing to the kernel:

  • Learning opportunity – Rust is now a valuable kernel skill
  • New contribution paths – Port existing drivers to Rust
  • Better abstractions – Rust kernel APIs are being developed
  • Reduced debugging – Compiler catches many bugs early

Challenges Ahead

Despite the success, challenges remain:

  • C interoperability – Safe FFI boundaries need careful design
  • Toolchain requirements – Rust compiler must be available
  • Developer education – Many kernel developers are new to Rust
  • Gradual adoption – The kernel will remain primarily C for years

Getting Started with Rust Kernel Development

Interested in writing Rust kernel code? Start here:

# Clone the kernel source
git clone https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git

# Install Rust toolchain
rustup override set $(scripts/min-tool-version.sh rustc)
rustup component add rust-src

# Enable Rust support in config
make LLVM=1 rustavailable
make LLVM=1 menuconfig
# Enable: General setup -> Rust support

# Build
make LLVM=1 -j$(nproc)

The Road Ahead

With the experiment declared successful, expect to see:

  • More subsystems accepting Rust code
  • Improved Rust kernel abstractions
  • Growing ecosystem of Rust drivers
  • Better tooling integration
  • Educational resources for Rust kernel programming

Conclusion

The declaration of Rust as a successful experiment in the Linux kernel is a watershed moment for systems programming. It validates years of work by the Rust for Linux team and opens the door to safer, more secure kernel code.

While C will remain the dominant language in the kernel for the foreseeable future, Rust now has an official place in Linux development. For new drivers and subsystems, developers can choose the language that best fits their needs.

This is excellent news for Linux users who will benefit from more secure and reliable kernel code, and for the broader open source community that sees continued innovation in the world most important open source project.

Was this article helpful?

R

About Ramesh Sundararamaiah

Red Hat Certified Architect

Expert in Linux system administration, DevOps automation, and cloud infrastructure. Specializing in Red Hat Enterprise Linux, CentOS, Ubuntu, Docker, Ansible, and enterprise IT solutions.

🐧 Stay Updated with Linux Tips

Get the latest tutorials, news, and guides delivered to your inbox weekly.

Add Comment