5 年了!Rust 终于在 Linux 内核中“转正”了
程序员的那些事·2025-12-18 01:41

Core Viewpoint - The introduction of Rust into the Linux kernel has transitioned from an experimental phase to being recognized as a long-term component, marking a significant shift in the kernel's development approach [2][6]. Group 1: Historical Context and Development - The Rust for Linux project began in 2020, aiming to assess whether Rust could justify the additional complexity it brings to kernel development [4]. - Initially, Rust code was limited and marked as "experimental," indicating a cautious approach to its integration into the kernel [4]. Group 2: Key Developments and Milestones - Over 20,000 lines of Rust code have been merged into the Linux upstream kernel since 2022, indicating a shift from mere proof of concept to real engineering progress [5]. - Rust-written kernel drivers are now running in real-world environments, such as in Google Pixel devices, demonstrating Rust's practical safety benefits [5]. - The ecosystem around Rust in the kernel is maturing, with foundational libraries and tools being developed, making it more accessible for developers [5]. Group 3: Official Recognition and Future Directions - The "experimental phase" of Rust support in the Linux kernel was officially declared over at the 2025 Linux Kernel Maintainers Summit, signaling a commitment to its long-term use [6]. - Despite the end of the experimental phase, significant work remains to adapt Rust for various architectures and configurations within the kernel [6]. - The transition to Rust is seen as a long-term investment, encouraging companies and hardware manufacturers to consider Rust for future driver development [8]. Group 4: Coexistence with C - The Linux kernel will continue to primarily use C, but the focus has shifted to how Rust can coexist and complement C within the kernel [9].