内存安全模型
Search documents
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].
5 年了,Rust 终于在 Linux 内核中“转正”了
3 6 Ke· 2025-12-15 11:53
Core Insights - The introduction of Rust into the Linux kernel has transitioned from an experimental phase to being recognized as a long-term component of the mainline kernel, marking a significant milestone in the ongoing debate about its role in kernel development [1][6]. Group 1: Rust's Journey in Linux Kernel - The Rust for Linux project began in 2020 with a cautious approach, aiming to assess whether Rust could justify the additional complexity it introduces to kernel development [3]. - Over 20,000 lines of Rust code have been integrated into the Linux upstream kernel since 2022, indicating a shift from mere proof of concept to a substantial engineering effort [4]. - Rust-written kernel drivers are now running in real-world environments, such as in Google Pixel devices, demonstrating that Rust's safety benefits are not just theoretical but applicable in practice [4]. Group 2: Official Recognition and Future Work - Miguel Ojeda, the project lead, announced that Rust support was integrated into the Linux v6.1 version, with the aim of evaluating its suitability for kernel development [5]. - The conclusion of the experimental phase does not imply that all challenges have been resolved; significant work remains regarding compatibility across different architectures and configurations [6]. - The acknowledgment of Rust's role in the kernel signals to companies and developers that Rust is a viable long-term investment, encouraging more training and development in Rust for kernel projects [7]. Group 3: Upcoming Projects and Developments - Several significant projects involving Rust are set to be integrated into the Linux mainline, including: - The Asahi project, targeting GPU drivers for Apple Silicon, with support for Devicetree schema expected in Linux 6.17 [8]. - The Nova driver, a Rust successor to Nouveau for NVIDIA GPUs, aiming for initial activation in Linux 6.19 [8]. - The Tyr driver for ARM Mali GPUs, which has already been able to launch the GNOME desktop and run basic games on Linux 6.18 [8].