Hacker News new | ask | show | jobs
by horeszko 858 days ago
LFS is Linux from Scratch right? (https://www.linuxfromscratch.org/index.html)

What are the implications of using Rust on building Linux?

1 comments

The Rust bootstrapping story is ugly.

https://guix.gnu.org/blog/2018/bootstrapping-rust/

LFS does not need to do all of that. LFS already uses the host computer's C compiler, so it seems just as reasonable to also use the host computer's rust compiler.
Doesn't part of the Rust compliation chain end up using `cc` anyway eventually for like, linking or something?

That might not apply at a "system's" level but I'm guessing in the massive Linux compilation job with module support you're making a bunch of object files with exported symbols?

The Linux kernel's build system uses rustc only for making object files.
That honestly doesn’t seem that horrible - particularly compared to some of the nigh-on-impossible tasks like bootstrapping GHC

(For the curious) https://elephly.net/posts/2017-01-09-bootstrapping-haskell-p...

That's my blog post!

Yes, the GHC story is also terrible (and just a tad worse than the rust story). The GHC problem is worse largely because the origins of GHC are murky. While it's still possible to get copies of the early GHC versions through the Internet Archive, the code lives firmly in the 1990s and assumes that you have access to long lost Haskell compilers. Turns out that all these Haskell compilers (with the exception of Hugs) have the same kind of problems that GHC has --- only worse because they are even older, depend on binaries of unreleased previous versions, and are really difficult to build with tools from the last two decades.