Committing to Rust in the Kernel
The integration of Rust into the Linux kernel is ongoing, facing mixed developer reactions. Focused on device drivers, the community is optimistic about future contributions despite slow progress and challenges.
Read original articleThe integration of Rust into the Linux kernel has been progressing for several years, with ongoing discussions about its status and future at the 2024 Maintainers Summit. Miguel Ojeda led a session addressing the need for flexibility from subsystem maintainers to accommodate Rust code, which has been met with mixed reactions from developers. While some express frustration over the slow pace of merging new functionalities, others see potential in Rust's ability to enhance kernel safety and performance. Key figures like Greg Kroah-Hartman and Linus Torvalds acknowledged that while the project is still experimental, it is viable and should continue to advance. The focus has been primarily on device drivers, which require extensive support code, contributing to the slower integration process. Developers are encouraged to manage expectations, as merging Rust code will take time, and the community is working to provide necessary documentation and support. The first successful driver merge is anticipated to be a significant milestone, potentially accelerating further Rust integration. Overall, while there are challenges, the kernel community is optimistic about Rust's future contributions.
- Rust integration into the Linux kernel is ongoing but slow.
- Developers express mixed feelings about the project's experimental status.
- The focus is currently on device drivers, which complicates integration.
- Documentation and support for Rust in the kernel are being developed.
- The first successful driver merge is expected to boost momentum for Rust adoption.
Related
Rust for Linux Revisited
Drew DeVault discusses the Rust-for-Linux project's challenges, suggesting a new Linux-compatible kernel in Rust could bypass political issues, attract contributors, and mentor new developers in the Rust ecosystem.
Linux-for-Rust or Rust-for-Linux
The integration of Rust into the Linux kernel faces skepticism over usability, performance, and support issues, while some developers advocate for its potential, citing successful implementations and the need for better compiler support.
Rust in Linux Revisited
Drew DeVault discusses the Rust-for-Linux project's challenges, highlighting political hurdles and developer burnout. He suggests creating a new Linux-compatible kernel in Rust as a potentially easier alternative.
Rust for Linux Revisited
Drew DeVault reflects on the Rust-for-Linux project's challenges, suggesting a new Rust-compatible kernel could alleviate political hurdles and developer burnout, while attracting contributors and expediting development.
Rust in Illumos
The article discusses the integration of Rust into the illumos operating system, highlighting development challenges, the need for community collaboration, and inviting contributions for userland tools and driver development.
Chuckled a bit at this line, anyone have context on how true this is?
Also, just to have some content that is actually on-topic: is anyone actually shipping upstream Linux Rust code yet? I understand that some stuff is slowly merging in but I'm not sure if it's actually being exercised yet.
I think this is the main technical change needed from the Linux kernel. It needs a layer of quasi-stable well documented subsystem APIs, which ideally would be "inherently safe" or at least have clear safe usage contracts. And it's fine for these interfaces to have relaxed stability guarantees in the early (pre-1.0, if you will) experimental stages. Changing them would involve more work and synchronization (C maintainers would not be able to quickly "refactor" these parts), but it's a familiar problem for many large projects.
It's the only reasonable point from the infamous tantrum by Ted Ts'o during the Rust for filesystems talk, everything else, to put it mildly, was a really disappointing behavior from a Linux subsystem maintainer.
Max level C programmers, have designed their programming style around control down to the absolute bit. C derives control from absolute control over behavior.
Max level Rust programmers have complete mastery of types. Rust derives control from types.
Seems somewhat philosophically incompatible.
1. It doesn't map almost 1:1 to assembly the way C does, so it's not inherently clear if the code will necessarily do what it says it does. That seems questionable for something as important as a kernel and driver.
2. Only one real Rust compiler, that's a recursive compiler, which reminds me of the Trusting Trust problem: https://dl.acm.org/doi/abs/10.1145/358198.358210
[0]: https://aya-rs.dev/
I think it's folly to encode the semantics of APIs in the Rust type system and memory model and that's the impedance mismatch that has people riled up. unsafe code isn't incorrect code, and trying to add abstraction where there wasn't one before is encoding principles where they didn't previously exist and should be an obvious problem.
I've written a lot of systems-type Rust using unsafe and I think the design pattern of -sys bindings and then a higher level safe wrapper is mostly incorrect because callers should always use the -sys bindings directly. It's more workable and doesn't suffer from changes that the detractors complain about.
Forgive me if this is something commonly known by the people involved. It just strikes me as the most obvious objection to Rust in the kernel and I haven't seen any explanation of what's going to happen.
What does this experiment for? What exactly is the evaluation? What are some example findings, both pro and con?
What an arse. Best to ignore these people.
Related
Rust for Linux Revisited
Drew DeVault discusses the Rust-for-Linux project's challenges, suggesting a new Linux-compatible kernel in Rust could bypass political issues, attract contributors, and mentor new developers in the Rust ecosystem.
Linux-for-Rust or Rust-for-Linux
The integration of Rust into the Linux kernel faces skepticism over usability, performance, and support issues, while some developers advocate for its potential, citing successful implementations and the need for better compiler support.
Rust in Linux Revisited
Drew DeVault discusses the Rust-for-Linux project's challenges, highlighting political hurdles and developer burnout. He suggests creating a new Linux-compatible kernel in Rust as a potentially easier alternative.
Rust for Linux Revisited
Drew DeVault reflects on the Rust-for-Linux project's challenges, suggesting a new Rust-compatible kernel could alleviate political hurdles and developer burnout, while attracting contributors and expediting development.
Rust in Illumos
The article discusses the integration of Rust into the illumos operating system, highlighting development challenges, the need for community collaboration, and inviting contributions for userland tools and driver development.