logoalt Hacker News

compiler-guy • yesterday at 5:07 PM • 2 replies • view on HN

It's simply an ordering problem. When building the entire world from scratch, usually the C and C++ toolchains are built near the very first, and Rust toolchains built somewhat later. Anything written in Rust must come after the Rust toolchain is built. You need a linker as part of your C++ toolchain, so it must be written in a language ready to go at that point. If it is written in C, you are done. If it is written in Rust you have to wait. So a Rust-based linker can no longer be used from that very, very early C bootstrap.

It's not a big deal for normal users, where you have Rust ready to go. Kind of a bummer in this case, but this is a specialized one.


Replies

veber-alex • yesterday at 5:33 PM

Can't you just use a statically linked mold binary for the initial bootstrap, just like you use some kind of pre-existing, basic C compiler?

➕ show 2 replies
someonebaggy • yesterday at 6:13 PM

Maybe that's about to flip. Maybe Rust will be built first, followed by C.

➕ show 3 replies