A detailed account of rewriting a Linux device driver from C to Rust, covering the challenges of kernel development including build configuration with Kconfig, managing complex Git workflows with multiple branches, creating safe Rust abstractions for C kernel APIs, and navigating the Linux kernel mailing list contribution process. The author demonstrates how reference counting solves borrow checker issues and shows practical examples of wrapping C structs, implementing iterators, and preventing buffer overflows in kernel code.

22m read timeFrom blog.buenzli.dev
Post cover image
Table of contents
Why did I do this?Compiling the kernelKconfig, I love to hate youO patches, where art thou?Git gudReading device tree properties from RustLKML: The end boss of kernel developmentClosing thoughts

Sort: