Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

Yeah, Barriers to in-tree Rust [video] → https://www.youtube.com/watch?v=FFjV9f_Ub9o&t=2045s


The biggest barrier is probably going to be the diff between architectures supported by Linux and those supported by Rust. It'll take several years for Linux to prune some of the lesser used architectures [1] and also years for Rust to add support on either LLVM [2] or via a WIP GCC frontend [3].

So while most people involved seem to supportive, including Torvalds and GKH, it will take time for any non-driver code to be written in Rust.

[1] - https://lore.kernel.org/lkml/CAK8P3a2VW8T+yYUG1pn1yR-5eU4jJX...

[2] - https://github.com/fishinabarrel/linux-kernel-module-rust/is...

[3] - https://rust-gcc.github.io


This is addressed in the questions in the aforementioned video[1] and it's actually not that much of a blocker at this point. There's plenty of arch-specific stuff in the kernel (drivers, but not only), so Rust can (and will) be used there. And there's no point waiting for complete architecture compatibility before starting to deploy some Rust in the kernel.

Of course it means that they aren't going to rewrite the core kernel logic in Rust tomorrow, but they wouldn't do it anyway even if GCC supported Rust.

[1]: https://youtu.be/FFjV9f_Ub9o?t=2930


LLVM just landed an experimental m68k backend, this week IIRC. That's some progress, anyways.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: