r/rust • • Aug 29 '24

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

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

374 comments sorted by

View all comments

Show parent comments

50

u/FractalFir rustc_codegen_clr Aug 29 '24

One of the biggest problems with Rust that Linus mentioned before is the instability of certain feaures. Zig is not even 1.0 - so that alone disqualifies it from being used in the kernel.

4

u/matthieum [he/him] Aug 29 '24

Note that Linus seemed to be complaining more about the instability of the infrastructure to support Rust in the kernel, than nightly Rust features.

Which is understandable, seeing as the kernel has been using non-standard GCC extensions forever, without ever worrying about them not being standard.

0

u/[deleted] Aug 29 '24

[deleted]

2

u/matthieum [he/him] Aug 30 '24

Sure. Didn't stop them from continuing to use resolutely non-standard extensions, though.

(And I do understand them, statement expressions are just SO useful)

-10

u/meowsqueak Aug 29 '24 edited Aug 29 '24

Your point about Zig notwithstanding, Linus was talking about the stability of the Rust code within the kernel, as written and maintained by the kernel Rust team, not Rust itself.

Edit: down-voted for correctness? This was literally the subject of a discussion on this very subreddit not more than a week ago.

18

u/HOMM3mes Aug 29 '24

Rust in the kernel is depending on nightly and unstable features, which is considered to be a problem

6

u/[deleted] Aug 29 '24

It's also a problem that the Rust developers have recognized and have made a high priority issue.

8

u/FractalFir rustc_codegen_clr Aug 29 '24

He was specifically talking about nightly features, like support for custom Arcs.

Zig is not stable, and tomorrow the Zig team could decide to flip syntax on its head, instantly making all zig code obsolete.

Zig is a fine language, but it is not ready for kernel development simply cause it is not done.

0

u/[deleted] Aug 29 '24

[deleted]

1

u/FractalFir rustc_codegen_clr Aug 29 '24

Well, in the quote provided, he is talking about issues with compiler versions.

So, in the last release I made, we finally got to the point where the Rust compiler that we can use for the kernel is the standard upstream Rust compiler, so we don't need to have extra version checks and things like that.

The reason they had to stick to custom versions was the lack of support for certain more exotic features - like custom arcs.

I belive he metioned them specificaly somehwere ealier - possibly when talking about atomics in Rust being not fully compatible with the ones used by Linux. Some things(mixing atomic operations of different sizes at the same address) are UB accordiding to the x86_64 manual and Rust, but are used by Linux since all exisiting CPUs handle the UB in the same, predicatble way.

So, if we know they had to stick to custom versions due to some specific missing features / issues, and we also know that he is saying that having to stick to a certain version is an example of instability. It does not seem unreasonable to assume that the missing features are the instability.

0

u/el_muchacho Aug 29 '24 edited Aug 29 '24

Agreed. But the language is better suited for this sort of task. That was the gist of my comment.