r/linux • • Dec 10 '25

Kernel "Rust in the kernel is no longer experimental — it is now a core part of the kernel and is here to stay."

https://lwn.net/Articles/1049831/
1.5k Upvotes

353 comments sorted by

View all comments

169

u/phylter99 Dec 10 '25

I guess I don’t know why some are not on board with this. It seems like a logical thing to do, allow Rust in the kernel.

88

u/syklemil Dec 10 '25 edited Dec 10 '25

I guess I don’t know why some are not on board with this.

As far as the kernel drama goes (and the LKML has always been a source of drama), there seems to have been at least two groups:

  1. Kernel devs who write in C because that's what the kernel uses. They're likely the group that wanted more options in the first place (and probably includes some people who'd be fine with C++ too if C++ in the kernel hadn't been shut down ages ago)

  2. C devs who work on the kernel because it's written in C. They're likely to raise a stink if they actually have to seriously consider another language, especially one with a severely different design philosophy like Rust.

Up until Rust-for-Linux (Rust-in-the-kernel?) started that split had been kinda invisible.

There are some more groups, like the ones working on some proprietary platform that only has a proprietary C compiler, but they tend not to garner much sympathy in the wider /r/linux culture. See also that one guy who's been making git work on the HPE Nonstop platform in his free time who is facing a similar problem as git is planning to include Rust, and the hyper-proprietary HPE Nonstop platform doesn't support Rust. These vendors could put some effort into getting LLVM support, or getting the Rust GCC backend working and supported, but they don't want that, they want people to use their own proprietary C compiler. And then complain that they're left out.

(I don't know about HPE though, they might have thought of git availability on their platform as a bug, not a feature.)

26

u/StarChildEve Dec 10 '25

knowing HPE, if it is useful it was probably unintentional.

11

u/john_a1985 Dec 10 '25

This. 

The only thing they care about is that their stuff is perfectly crafted to blow up right when the warranty expires. Bingo!

9

u/steveklabnik1 Dec 10 '25

in his free time

I'm pretty sure he's paid to maintain it.

These vendors could put some effort into getting LLVM support, or getting the Rust GCC backend working and supported, but they don't want that,

The nonstop folks did pay people to try to port both gcc and llvm multiple times, and it never got working.

On one hand I conceptually agree with you that proprietary platforms not investing in their platform is bad, but everything I've read about the NonStop stuff in particular was them seemingly being good citizens. IIRC the guy wasn't even saying "therefore you can't use Rust because I'll be in a hard place," it was something more reasonable like "Could we consider only using it for new features at first."

17

u/syklemil Dec 10 '25 edited Dec 10 '25

in his free time

I'm pretty sure he's paid to maintain it.

Nope:

My company pretends to donates my time with very little direct benefit to them. My participation is because I feel it is important for my community. No, I do not get a salary for my git time. It is evenings and weekends. Any time I spend during working hours has to be made up during off hours.

I'm pretty sympathetic to him personally, but it seems pretty clear that his efforts to have git working on the platform is pretty much something his employer tolerates.

That's also why I'm framing parts of the discussion in terms of "these vendors". The guy in question is also positive to the prospect of having Rust as an option, but that's beyond him, which seems absolutely fair to me.

My general stance here is that his employer should treat him better and hopefully see that maintaining git provides value to their operation so he can do it as part of his job, and that HPE should do a better job of providing compiler support for their platform. But I guess with

The nonstop folks did pay people to try to port both gcc and llvm multiple times, and it never got working.

I could be a bit more generous towards them.

edit Some more Becker quotes, from a later email

There is momentum for Rust on NonStop. It just takes time to get budget for the effort. After getting budget, it takes time for the port. I am likely to have some involvement in that, one way or another. NonStop does support git, mostly through my ongoing efforts and they do use it extensively. This really is a crucial application and the NonStop team does understand the implications. The problem is that everything takes time, more than git is allowing in this case. I cannot disclose more than that.

Yes, people are screaming at me to fix it, which is not easy. The policy is not the Problem, but the technical limitations are. It is not a surprise, because I was involved In the POSIX effort when it was first introduced on NonStop, not that many "in the know" Listened to my concerns, which are now having significant consequences.

I can only hope that between the "my company pretends to donate my time" and "people are screaming at me to fix it", they have actually started paying him to work on it, because goddamn, if they haven't, they really need to STFU.

10

u/steveklabnik1 Dec 10 '25

Ah thank you! I agree that it not being his job does change things a bit.

4

u/Compux72 Dec 10 '25

Aren't HPE Intel based? Seems trivial to cross compile git imho

12

u/syklemil Dec 10 '25

Yeah, I don't think the processor architecture is the problem, but rather that HPE very intentionally wants a walled garden, and plenty of its customers want a walled garden too, with strict policy requirements for what sort of code and programs are permitted.

So for an arbitrary /r/linux user, it comes off as someone picking a product because it has very big, strong walls all around and then complaining that they're walled in.

HPE probably has some proprietary source control system that they'd prefer for their customers to use, too. The kind of system that makes the rest of us go "people pay for this stuff????"

→ More replies (1)

41

u/Sol33t303 Dec 10 '25

A lot of the old kernel devs just don't have a lot of experience with rust, and don't want to have to review rust code.

25

u/StillSpecialist6986 Dec 10 '25

But here's the thing: Rust maintainers offered to maintain both the interfaces and the Rust code. C maintainers never need to touch Rust or review Rust code. They're being stubborn because they're losing a sense of control over their subsystems.

→ More replies (2)

17

u/ThellraAK Dec 10 '25

I know I hated it as a build dependantcy when I was using Gentoo.

11

u/derangedtranssexual Dec 10 '25

Why?

20

u/Barafu Dec 10 '25

Probably hated all build dependencies. Its Gentoo.

→ More replies (2)

5

u/oln Dec 10 '25

not op but it's annoying when tinkering on my ancient machines that the rust package on gentoo doesn't work without SSE2 currently, granted that is a very niche thing lol. (The rust compiler does technically support it but the gentoo ebuild isn't patched to work with it as of now as it seems to need some tweaking to work properly and upstream rust and llvm devs are not super stoked about supporting it either as it results in some non-standard float behaviour unless you want to do super slow soft float emulation.)

9

u/AWonderingWizard Dec 10 '25

Well for one, it is one of the longest compile times you can possibly have.

15

u/derangedtranssexual Dec 10 '25

Oh I see, I hadn’t considered rust’s terrible compile times would annoy gentoo users, I guess there’s positives in everything

→ More replies (2)
→ More replies (1)

52

u/NaheemSays Dec 10 '25

Rust is not available/stable on all platforms Linux runs on

97

u/zayatura Dec 10 '25

Then those platforms will not be able to use the kernel modules written in Rust. It's not like core parts of the kernel are being rewritten in Rust.

→ More replies (7)

24

u/Tusen_Takk Dec 10 '25

Is this not a large push towards the rust developers to make that not the case with great haste?

27

u/DHermit Dec 10 '25

It's dependent on LLVM. And there are projects for non-LLVM based building, but they obviously are huge undertakings.

32

u/tesfabpel Dec 10 '25

There are also efforts like gccrs and rustc_codegen_gcc (in the same GitHub organization as Rust).

The first is a frontend for GCC and replaces rustc.

The second is an alternative backend for rustc that uses libgccjit to use GCC as the underlying compiler, instead of LLVM (or cranelift). This IMHO is the best way forward but gccrs has also its reason to exist.

22

u/adnanclyde Dec 10 '25

With the prospect of Rust becoming a part of the Linux kernel's future, I can imagine a lot more resources getting poured in the alternatives. Whether it's a gcc based compatible compiler, or adding more targets supported into Cranelift.

13

u/DHermit Dec 10 '25 edited Dec 10 '25

That could be, but on the other hand, the targets where Rust isn't available aren't all that popular.

Edit: is -> isn't

9

u/Lower-Limit3695 Dec 10 '25 edited Dec 10 '25

Rust is available for:

  • x86

  • x86_64

  • arm

  • aarch64

  • riscv32

  • riscv64

  • mips

  • mips64 -powerpc

  • powerpc64

  • nvptx

  • wasm32

  • loongarch32

  • loongarch64

  • s390x

I would not say that the targets where Rust is available aren't all that popular. (Many of these are very popular).

I'd say that issue is that Rust doesn't support the same breadth of architectures as gcc

→ More replies (2)
→ More replies (1)
→ More replies (10)
→ More replies (39)