Linux Kernel Merges First Production Rust Network Driver, Marking a Turning Point

Technology·4 min read
A dark terminal screen showing Linux command-line output with green text

The Linux kernel has reached a milestone that proponents of memory-safe systems programming have been anticipating for years: the merger of the first production-quality network driver written entirely in Rust. The driver, which supports Realtek RTL8169-family Gigabit Ethernet controllers, was merged into the mainline kernel tree this week and is expected to ship with Linux 6.14.

A Long Road to This Point

Rust support was initially added to the Linux kernel in version 6.1, released in December 2022. At the time, the infrastructure was experimental — the necessary abstractions, bindings, and build system integrations were still being developed. Early Rust code in the kernel was limited to simple proof-of-concept modules and helper utilities.

Over the past three years, a dedicated group of developers has steadily built out the Rust-for-Linux infrastructure. Safe abstractions over core kernel subsystems — memory allocation, locking primitives, device model, and networking — have been developed, reviewed, and refined through dozens of kernel release cycles.

The RTL8169 driver represents the culmination of this work: a real, shipping driver that handles actual hardware in production systems.

Why Rust in the Kernel Matters

The Linux kernel is written almost entirely in C, a language that offers no built-in protection against memory safety bugs. Over the kernel's 30-plus-year history, countless security vulnerabilities have stemmed from buffer overflows, use-after-free errors, and other memory safety issues.

Rust's ownership model and type system prevent entire categories of these bugs at compile time. A Rust driver that compiles successfully is, by construction, free from data races and most memory safety errors. For a codebase as critical as the Linux kernel — which runs on everything from phones to supercomputers to the International Space Station — this guarantee is enormously valuable.

The RTL8169 Driver

The Realtek RTL8169 family of Ethernet controllers was chosen deliberately. The hardware is widely available, well-documented, and already has a mature C driver in the kernel, providing a direct basis for comparison.

The Rust implementation was developed primarily by a team at Samsung's Open Source Group, with contributions from developers at Google, Microsoft, and the broader Rust-for-Linux community. The driver implements the full feature set of the existing C driver, including hardware offloading, VLAN support, and power management.

Preliminary benchmarks show the Rust driver performing within 2 percent of the C implementation in throughput and latency tests. The Rust version is approximately 15 percent more lines of code, which the developers attribute to Rust's more explicit error handling and the overhead of safe abstractions. However, they note that the Rust driver required zero iterations to fix memory safety issues during review, whereas the original C driver has accumulated over 40 memory-related bug fixes since its introduction.

Community Response

The merger has reignited debate within the kernel community. Linus Torvalds, who has been cautiously supportive of Rust in the kernel, commented on the mailing list that the driver "looks solid" and that the goal has always been to prove Rust can work alongside C in production code.

Not everyone is enthusiastic. Several veteran kernel maintainers have expressed concern about the maintenance burden of supporting two languages, the learning curve for existing contributors, and the immaturity of Rust's kernel abstractions. A few subsystem maintainers have stated they will not accept Rust code in their areas until the tooling and abstractions are more mature.

What Comes Next

The Rust-for-Linux team has outlined an ambitious roadmap. GPU drivers are a high-priority target, with the Nova project developing a Rust-based driver for NVIDIA GPUs using the open-source GSP firmware interface. Filesystem drivers and USB subsystem components are also under active development.

Google has committed engineering resources to developing Rust drivers for Android-relevant hardware, and Microsoft is contributing to Rust abstractions for Hyper-V guest drivers.

The Bigger Picture

The merger of a production Rust driver does not mean the Linux kernel is being rewritten in Rust. The vast majority of the kernel will remain C for the foreseeable future. What it does mean is that new drivers and subsystems can now be written in a language that prevents entire classes of vulnerabilities, and the infrastructure to support this is production-ready.

For the broader software industry, the Linux kernel's adoption of Rust validates the language's suitability for the most demanding systems programming environments. It is a signal that memory safety is not just a nice-to-have — it is becoming an expectation, even in the most performance-critical codebases on the planet.

Share

Related Stories