Why Rust is coming to the Linux kernel

Why Rust is coming to the Linux kernel

More

Descriptions:

In this episode of The Pragmatic Engineer, a senior Linux kernel maintainer discusses the multi-year effort to integrate Rust into the Linux kernel — an initiative that has already produced around 25,000 lines of Rust code. The most visible deployment is a QR code crash handler introduced in a recent kernel release: when the kernel panics, it displays a QR code users can photograph to access a crash dump. That feature was written entirely in Rust and represents the kind of self-contained utility where the language integration is straightforward.

The harder challenge is drivers. Unlike standalone utilities, drivers must consume APIs from across the entire kernel — locking primitives, I/O subsystems, the driver model, USB — and each interface requires a binding layer between Rust and C code. Building those bindings has consumed years of effort from dedicated contributors and produced some of the most intricate Rust code in existence. The maintainer is candid that some C/Rust binding designs initially proposed required a thousand lines of Rust to replicate what two lines of C already did, and that collaboration between kernel developers and Rust language contributors was necessary to find workable abstractions.

Despite the complexity, the maintainer estimates roughly half of the kernel bugs he has reviewed over 18 years would have been prevented by Rust’s ownership and lifetime guarantees. Red Hat developers are writing new Nvidia GPU drivers in Rust, and Apple’s GPU drivers for MacBooks exist as working Rust implementations in an active fork. The conversation also clarifies an important nuance: Rust memory safety does not mean crash-proof — it addresses object lifecycle and ownership bugs, not logic errors.


📺 Source: The Pragmatic Engineer · Published December 11, 2025
🏷️ Format: Interview

1 Item

Channels