
Kernel Languages: C, Assembly, and Rust

How Linux is built with Greg Kroah-Hartman
Topic 14 of 17
Published Jul 6, 2025 · Clip 59:29–1:08:14 (8:45)
Greg explains Linux is written in C (not C++), with some assembly for early boot and core functions like locking. Linux patches itself at boot to optimize assembly functions for the specific processor. He then discusses Rust: 25,000 lines already in the kernel (mostly bindings), with a QR code crash dump feature written in Rust. The challenge is writing bindings between C and Rust for every subsystem. Memory safety in Rust means object lifecycle safety, not bug-free code. Rust is forcing better C code documentation. Red Hat is writing Nvidia GPU drivers in Rust and Apple GPU drivers exist in Rust on forks. Government mandates against memory-unsafe languages drive adoption. Google found new Rust code is more secure than old C code.