Back to blog

Rust in the Linux Kernel: The Experiment Is Over

rustlinux-kernelprogrammingsecurity

In December 2025, at the Kernel Maintainers Summit in Tokyo, the people who steer Linux kernel development agreed that Rust support is no longer an experiment. The practical change was almost anticlimactic: the section titled The Rust experiment was removed from the kernel documentation. The meaning, though, is significant. Rust is now a permanent part of the kernel, and the question has moved from whether it belongs to how it should be used.

What was actually decided

Miguel Ojeda, who leads the Rust for Linux effort, summarised the outcome plainly: the experiment is done, and Rust is here to stay. He was also careful to add that this does not mean everything works for every kernel configuration, architecture or toolchain, and that a lot of work remains. Linux 7.0, released in April 2026, carried the change forward in its documentation and release coverage.

Why Rust, and why now

The kernel is written overwhelmingly in C, a language that gives programmers complete control and no safety net. A large share of serious security vulnerabilities in operating systems come from memory errors: reading past the end of a buffer, using memory after it has been freed, or two threads touching the same data unsafely. Rust's compiler rules out most of those mistakes before the code ever runs.

That makes Rust especially attractive for device drivers. Drivers are numerous, often written by hardware vendors rather than core maintainers, and they run with full kernel privileges, so a single bug can compromise the whole system.

What this does not mean

  • The kernel is not being rewritten in Rust. As of April 2025 it contained roughly 34 million lines of C and only about 25 thousand lines of Rust.
  • C is not going away. Rust is being adopted selectively, mostly for new code and new drivers.
  • Existing C subsystems are not forced to accept Rust code. Maintainers still decide what goes into their areas.

Real-world use

Rust code in Linux is not just a demonstration. Android 16 devices built on the 6.12 kernel ship the ashmem memory allocator, which is the anonymous shared memory subsystem, implemented in Rust. It is an early example of a widely deployed consumer product depending on Rust inside the kernel.

The controversy and the culture

The road here was not smooth. Mixing two languages in one codebase forces maintainers to coordinate over interfaces, and some veteran developers argued that the extra complexity was not worth it. Debates about how Rust bindings should interact with C subsystems were heated, and a few contributors left the effort. The decision at the Maintainers Summit reflects a consensus that the benefits justify continuing, along with an acknowledgement that the process needs to be handled respectfully.

What it means beyond the kernel

The kernel is not the only part of the Linux stack moving this way. Distributions are also experimenting with Rust implementations of core command-line tools, and desktop projects such as System76's COSMIC are built in Rust from the ground up. Taken together, they suggest that memory-safe languages are becoming a normal part of open-source infrastructure rather than a curiosity.

If you want to get involved

Rust for Linux has public documentation, mailing lists and a growing set of abstractions that make writing drivers more approachable. You do not need to be a kernel veteran to read the code and understand what a safe wrapper around a C interface looks like. If you already write Rust, a small driver or a documentation fix is a realistic first contribution, and the project actively welcomes new people.

Common questions

Do you need to learn Rust to use Linux? Not at all. Everyday users and most application developers will never see the difference, apart from potentially fewer memory-related security bugs in drivers over time. Will old hardware lose support because of Rust? Existing C drivers keep working, and Rust is not required for architectures or configurations it does not yet support. Can C and Rust code call each other? Yes, through carefully designed bindings, and much of the recent work has focused on making those interfaces safe and ergonomic. Is Rust automatically bug-free? No. It prevents many memory errors but cannot catch logic mistakes, so reviews, testing and fuzzing remain essential.

Sources