|
|
Log in / Subscribe / Register

Lines by C vs Rust

Lines by C vs Rust

Posted Feb 13, 2026 14:14 UTC (Fri) by ojeda (subscriber, #143370)
In reply to: Lines by C vs Rust by jmalcolm
Parent article: Development statistics for 6.19

> Of course, Rust is not really used in the real kernel just yet as it is all support code and a few drivers.

Considering Linux's design, it very much is "real kernel" code, which was one of the main reasons Rust for Linux happened. Not to mention things like Binder, which is as critical as you can get for the systems that use it (functionality-, security- and performance-wise).

I suspect you may be referring to (currently) non-loadable, non-configurable features. The limitation for those, as you say, is the toolchain support, but if the relevant maintainers were to deem maintaining a duplicate implementation worth it, then it could technically be done today.

> Thankfully, gccrs has it as a goal for this year to compile the Linux kernel and LWN has it as one of their 2026 predictions.

There is another way as well, `rustc_codegen_gcc`, which already back in Kangrejos 2022 managed to build the kernel. It is still not production ready, but it does boot a x86_64 kernel with Rust code running on it.

Having said that, even if either GCC Rust or `rustc_codegen_gcc` become ready this year (even for several architectures), we will likely want to wait until the packages are in some distributions and so on.

But, yes, if they at least become ready for a major architecture, which is our hope for this year or the next, then that is a very strong signal, and it could easily mean that more maintainers decide to use Rust for their next feature, or perhaps even to maintain parallel implementations.


to post comments

Lines by C vs Rust

Posted Feb 16, 2026 10:17 UTC (Mon) by taladar (subscriber, #68407) [Link]

I am not a kernel developer but if you told me I had to work in a language I don't prefer for a few more years for the benefit of a bunch of hobbyists trying to keep architectures alive that are out of production for 20+ years I would probably either stop working in the project entirely (or not start working in it) or ignore that statement and just work in my preferred language anyway.


Copyright © 2026, Eklektix, Inc.
Comments and public postings are copyrighted by their creators.
Linux is a registered trademark of Linus Torvalds