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

Show parent comments

92

u/PoL0 Dec 10 '25 edited Dec 10 '25

the problem is platform support. Linux supports some platforms where rust isn't available, or isn't stable.

edit: just to be clear I'm not against Rust being used in the Linux kernel. this might be a deal breaker for certain platforms, tho

115

u/robin-m Dec 10 '25

As long as it's for drivers it doesn't matter. And I assume that they're not stupid to the point of adding Rust to core component until either gccrs or rustc_codegen_gcc become production ready.

-31

u/PoL0 Dec 10 '25

As long as it's for drivers it doesn't matter. And I assume that they're not stupid to the point of adding

until you need one of those drivers in a platform that doesn't support rust? maybe it's far fetched, no idea

51

u/robin-m Dec 10 '25

Either it’s some kind of of microcontroller that you always cross-compile for, so Rust compiler availability doesn’t matter, just architecture support. Or it doesn’t even make sense. Each driver is made specifically made for a specific hardware. It’s impossible that you have a driver that already exists, but for an architecture that doesn’t support the language the driver was written into. Driver aren’t hardware-independant user code.

→ More replies (3)

33

u/the_bighi Dec 10 '25

Won’t happen, you’re trying to complain about a problem that doesn’t exist. The few places where rust isn’t 100% are the places you won’t need a specific niche driver.

→ More replies (2)

16

u/23Link89 Dec 10 '25

Exactly I want my BRAND NEW open source NVIDIA drivers to work on my Xtensa microcontroller. If I can't play Cyberpunk on my micro, IT'S USELESS 😡

→ More replies (2)
→ More replies (3)

25

u/monocasa Dec 10 '25 edited Dec 10 '25

It looks like the only archs left in linux that rust doesn't support are alpha, arc, microblaze, nios2, openrisc, parisc, and sh.

Basically archs that no one has cared to add support to llvm for. All very dead, and for about half I'd argue no one really ran linux on them much anyway to begin with, it was more a "you totally could, please buy a bigger FPGA and run a full linux distro on your soft core, please and thank you".

6

u/paecificjr Dec 11 '25

I actually use microblaze at work.

6

u/monocasa Dec 11 '25

Do you run linux on it?

3

u/paecificjr Dec 11 '25

Yeah, petalinux

26

u/lightmatter501 Dec 10 '25

I question how often those platforms are actually used with modern Linux. I worked with someone trying to take a look at a PA-RISC system recently and glibc was broken and gcc miscompiled some stuff. Writing a new LLVM backend isn’t really that hard, so if nobody has bothered to do it for an ISA there’s probably a reason.

Unlike a lot of the software from the “big iron” era, I think a lot of “unix wars” era software was largely portable due to market forces (you want to sell to everyone, not just DEC or Sun or HP or Motorola customers), so companies simply moved to new hardware as performance kept going up. This means that those ISAs, which neat academically, are less likely to be in active use.

15

u/mmstick Desktop Engineer Dec 10 '25

The same architectures missing from LLVM aren't supported well by GCC either. And there's a reason why they're not supported well. These systems most certainly aren't using Linux 6.X

6

u/tsreardon04 Dec 10 '25

Maybe I'm just ignorant to some low level detail, but once the code is compiled why would it matter if it's c or rust?

10

u/jarx12 Dec 10 '25

I guess the compiler is either not avaliable or not stable, but if nobody got bothered enough to give it a rust compiler in the craze that rust popularization has been is probably a very edge usecase

7

u/Business_Reindeer910 Dec 11 '25

The problem is the compiler itself. GCC supports more platforms than rust (really llvm) does. People are working on projects to rectify this from multiple different directions

27

u/Pugs-r-cool Dec 10 '25

While true, it's all niche hardware that very few people care about anyway.

→ More replies (4)

3

u/Prudent_Psychology59 Dec 10 '25

if you are concerned about linux, make a fork

5

u/i_h8_yellow_mustard Dec 11 '25

Edge cases and ancient archs should not hold back the future.

3

u/PoL0 Dec 11 '25

so you imply Rust is the future?

3

u/i_h8_yellow_mustard Dec 19 '25

Yes - at least to a degree. It's not going to replace every other language, but I expect to see it adopted more and more as time goes on since memory safety is important.

1

u/PoL0 Dec 19 '25

there's lots of domains where rust doesn't cut it, and that's ok

it's just a language. a tool. you cant do everything with a single tool.

1

u/chum_bucket42 Jan 02 '26

seeing as I still use spinning rust for storage, I'd have to say it's the future

4

u/jbaranski Dec 10 '25

Piggybacking your comment here.

Progress inevitably necessitates change. So long as the change is gradual/has plenty of warning I see no reason not to make changes such as this. Rust is simply more sturdy than C in that it catches problems in code that would normally have to be discovered through very careful and meticulous manual review.

Basically Rust has guardrails to offset human error and that’s a boon for anyone who wants a stable and predictable system.

1

u/Cylian91460 Dec 11 '25

Rust is compiled tho? Like it's the same portability as C?

-11

u/mrlinkwii Dec 10 '25

honestly its time to drop the old stuff that dosent support it