top | item 41825049

(no title)

MBlume | 1 year ago

I would be shocked if the rust documentation didn't explain very clearly how to bootstrap rustc starting from gcc

discuss

order

wolfgang42|1 year ago

Prepare yourself for a shock then; bootstrapping rustc starts from an already-built version of rustc[1]:

> the only way to build a modern version of rustc is a slightly less modern version.

(There is, at least theoretically, a non-circular bootstrap chain starting with a very old rustc written in OCaml, but the more practical alternative is probably to use mrustc[2] instead.)

[1] https://rustc-dev-guide.rust-lang.org/building/bootstrapping...

[2] https://guix.gnu.org/en/blog/2018/bootstrapping-rust/

fweimer|1 year ago

Ocaml has a bytecode blob in the sources (even checked into Git). It uses that to resolve its own bootstrap problem. If you aim for a source-only starting point, your journey won't stop at Ocaml.