|
|
Subscribe / Log in / New account

Building Rust-for-Linux on stable Rust

Building Rust-for-Linux on stable Rust

Posted Sep 24, 2024 20:50 UTC (Tue) by pizza (subscriber, #46)
In reply to: Building Rust-for-Linux on stable Rust by cesarb
Parent article: Committing to Rust in the kernel

> It doesn't; the kernel uses several non-standard GCC extensions with no fallback, and requires a version of GCC or clang which is recent enough to provide all these required extensions.

While what you are saying is _technically_ correct, the details paint a very different story.

Linux only requires GCC 5.1, which was released *nine years* ago. Versus rustc 1.78, which only landed *four months* ago.

(Or you could use LLVM/Clang intstead of GCC, that requires a ~2.5-year old version (13.0.1)

Source: https://www.kernel.org/doc/html/next/process/changes.html


to post comments

Building Rust-for-Linux on stable Rust

Posted Sep 24, 2024 22:33 UTC (Tue) by intelfx (subscriber, #130118) [Link] (6 responses)

> While what you are saying is _technically_ correct, the details paint a very different story.

Only if you conveniently ignore some of these details and highlight the others.

> Linux only requires GCC 5.1, which was released *nine years* ago. Versus rustc 1.78, which only landed *four months* ago.

Yes, so how old is the C code in Linux, and how old is the Rust code in Linux? And how much time did it take (since the inception of $LANGUAGE code in Linux) to arrive at this state of affairs?

I’ve said it before, and I’ll say it again: it is unfair and disingenuous that the “new contender” is immediately required to clear the bar that nothing else was subjected to for a damn long time.

Building Rust-for-Linux on stable Rust

Posted Sep 25, 2024 0:06 UTC (Wed) by pizza (subscriber, #46) [Link] (5 responses)

> I’ve said it before, and I’ll say it again: it is unfair and disingenuous that the “new contender” is immediately required to clear the bar that nothing else was subjected to for a damn long time.

It is unfair to deliberately misstate Linux's C compiler requirements as well.

When Linux 5.15 bumped the minimum version to GCC 5.1, the latter had been available for *seven years*. (As opposed to the then-brand-new GCC 11)

Building Rust-for-Linux on stable Rust

Posted Sep 25, 2024 4:48 UTC (Wed) by khim (subscriber, #9252) [Link] (4 responses)

And when Linus presented Linux in comp.os.minix he explicitly have written: It also uses every feature of gcc I could find. And he used the most recent version of gcc he could find.

Now, that doesn't mean that then need to use bleeding version of Rust would stay with us forever, but I don't see why Rust have to be treated differently from how C was treated in the Linux bringup phase.

Building Rust-for-Linux on stable Rust

Posted Sep 25, 2024 11:56 UTC (Wed) by pizza (subscriber, #46) [Link] (3 responses)

> Now, that doesn't mean that then need to use bleeding version of Rust would stay with us forever, but I don't see why Rust have to be treated differently from how C was treated in the Linux bringup phase.

Because unlike Linus's original announcement of Linux 30-odd years ago, Linux is no longer a just-for-fun toy.

If Rust proponents claim that the quality standards/practices of yesteryear are wholly insufficient today then they can't claim "waaah we're being held to a higher standard than ysteryear" when the mirror is turned on them.

The response to the "Rust tooling is still immature and doesn't cover all use cases that some folks need" *fact* should be (and according to the _actual_ R4L devs, is) "We're still working on it; we'll get there", not "waah different standards, give us special treatment instead" or "those use cases don't matter" of the _very_ annoying fanbois that keep coming out of the woodwork.

Building Rust-for-Linux on stable Rust

Posted Sep 25, 2024 14:15 UTC (Wed) by intelfx (subscriber, #130118) [Link]

> The response to the "Rust tooling is still immature and doesn't cover all use cases that some folks need" *fact* should be (and according to the _actual_ R4L devs, is) "We're still working on it; we'll get there", not "waah different standards, give us special treatment instead" or "those use cases don't matter" of the _very_ annoying fanbois that keep coming out of the woodwork.

Now this is a case of shifting the goalposts.

The response is, and always was, "We're still working on it and we'll get there". Nobody has ever said "waah different standards" while asking for "special treatment". The problem with different standards is merely that certain vocal people want "getting there" to happen in zero time. C did not get there in zero time, so why does Rust have to?

Building Rust-for-Linux on stable Rust

Posted Oct 2, 2024 10:57 UTC (Wed) by taladar (subscriber, #68407) [Link] (1 responses)

Seems to me that C is a pretty immature language if you need a 9 year old compiler because some platforms are so reluctant to update that unstable mess to a newer version that they are almost 10 major versions behind the current version.

Seems if you try even a little bit portraying the facts to make the process the other side uses look bad is actually pretty easy.

Building Rust-for-Linux on stable Rust

Posted Oct 2, 2024 12:12 UTC (Wed) by pizza (subscriber, #46) [Link]

> Seems to me that C is a pretty immature language if you need a 9 year old compiler because some platforms are so reluctant to update that unstable mess to a newer version that they are almost 10 major versions behind the current version.

For Linux, said 9-year-old compiler is the *minimum* required version, not the *only* version that is supported/expected to work.

(I am typing these words on a system with the most recent Linux release, compiled using the most recent GCC release)

> Seems if you try even a little bit portraying the facts to make the process the other side uses look bad is actually pretty easy.

Another thing that makes you look bad is deliberately mis-stating documented facts.

Building Rust-for-Linux on stable Rust

Posted Sep 25, 2024 1:22 UTC (Wed) by Wol (subscriber, #4433) [Link]

> Linux only requires GCC 5.1, which was released *nine years* ago. Versus rustc 1.78, which only landed *four months* ago.

istr that for many years Linux had a *maximum* version of gcc, which was positively ancient! If Linux can complain, at different times, that some gccs are too old, while other gccs are too new, then why can't it complain that some rustcs are too old, while others are too new? It is what it is. You just have to use whatever compiler that works.

At the end of the day, the version of the compiler is irrelevant. Seeing as most of the Rust code currently appears to be drivers, if the compiler is contemporaneous with the hardware or feature, what's the problem?

Cheers,
Wol


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