r/linux • • Aug 29 '24

Kernel One Of The Rust Linux Kernel Maintainers Steps Down - Cites "Nontechnical Nonsense"

https://www.phoronix.com/news/Rust-Linux-Maintainer-Step-Down
1.1k Upvotes

794 comments sorted by

View all comments

Show parent comments

1

u/meltbox Sep 03 '24

Yeah. The fact that I had to scroll this far shows most people commenting here appear to fundamentally misunderstand the issue.

No to be clear they should’ve let the presenter finish. That was wild.

But also the argument they started during the presentation is that the rust API being proposed was unmanageable because in order to encode the inode contract you’d end up with a variant of the function definition for every single file system that uses that function. The alternative is of course to write a whole new API for rust and rewrite the filesystems in rust.

This is actually a very sound criticism and shows some serious technical issues with bringing rust in. And no, proposing every signature exists and is maintained in the kernel indefinitely is not a sane solution.

1

u/SnooCompliments7914 Sep 03 '24

Or you don't have to encode everything into the type system. A lot of checks can be done at runtime, resulting in a more "traditional" wrapper similar to a Java or Python wrapper to a C API.

1

u/meltbox Sep 03 '24

But then what advantage does using rust give you there? Seems like the whole point of (and I might be being dumb here) was the compiler checks it?

1

u/SnooCompliments7914 Sep 04 '24

The point is memory safety in a non-GC language. I.e. if your program:

  1. Compiles.

  2. Uses no `unsafe`.

  3. All libraries used are `sound`.

Then your program is `sound`, meaning it has no memory safety problems.

There is no requirement (and is impossible) that this must be done statically. We shall find the balance between compile-time and runtime checking. Just like we shall find the balance between using generics and `dyn`.

The community might be a bit too leaned to the compile-time side, though.