← Back to context

Comment by gkbrk

10 months ago

This is not what the "Rust kernel policy" [1] of Rust for Linux says.

[1]: https://rust-for-linux.com/rust-kernel-policy

> Who is responsible if a C change breaks a build with Rust enabled?

> The usual kernel policy applies. So, by default, changes should not be introduced if they are known to break the build, including Rust.

> Didn't you promise Rust wouldn't be extra work for maintainers?

> No, we did not. Since the very beginning, we acknowledged the costs and risks a second language introduces.

You conveniently left out

> However, exceptionally, for Rust, a subsystem may allow to temporarily break Rust code. The intention is to facilitate friendly adoption of Rust in a subsystem without introducing a burden to existing maintainers who may be working on urgent fixes for the C side. The breakage should nevertheless be fixed as soon as possible, ideally before the breakage reaches Linus.

  • Yes, "breakage should be fixed as soon as possible". Not "Rust for Linux team will fix the breakage as soon as possible".

    The exception is allowing the subsystem to break Rust code temporarily. If you accept a patch in C that breaks Rust code, and the Rust for Linux team doesn't fix it quickly enough, you either need to fix the Rust code yourself, remove it, or re-write it in C. All of this would take time and energy from all the non-R4L kernel devs.

    This is why people are reluctant to accept too much mixing of the C and Rust codebases, because even the Rust for Linux team isn't promising to fix breakages in Rust for Linux code.

    • Just to be clear, this is the situation. A rando submits a C patch that breaks Rust code, a maintainer accepts this patch and then demands that the R4L devs fix the breakage introduced by someone else and reviewed by themselves. The rando who broke the thing isn't around, and the person who reviewed the change takes no responsibility.

      Have I gotten that right?

      And then you're presenting this situation as "the Rust for Linux team isn't promising to fix breakages in Rust for Linux code". Somewhat disingenuous.

      4 replies →