Compiler is just a string-manipulation program, there’s nothing inherently magical about it. Just gh clone rust-lang/rust && cd rust && cargo run —bin rustc could work. Heck, it could even be go build :)
Rustc is made magical though by the fact that it requires standard library from the repo itself.
Does anybody know of specific things that would require, for example, GHC to pin to exactly one version of GHC for compiling certain code?
I get that compiler versions do change things, but I am having a hard time imagining things where source code semantics will change enough to where this is an issue. Unless the statement is more that “Version X of GHC requires Version Y of GHC, and compiling with other versions might work but are unsupported”
Was confused by the title until I realized this isn’t relevant to 99.9% of Rust users, this is just for people working on the language itself.
Yes, rust bootstrapping story is more complicated that needs to be, wrote a similar thing a while ago in https://matklad.github.io/2020/09/12/rust-in-2021.html#Compiling-the-Compiler.
Compiler is just a string-manipulation program, there’s nothing inherently magical about it. Just
gh clone rust-lang/rust && cd rust && cargo run —bin rustc
could work. Heck, it could even bego build
:)Rustc is made magical though by the fact that it requires standard library from the repo itself.
Does anybody know of specific things that would require, for example, GHC to pin to exactly one version of GHC for compiling certain code?
I get that compiler versions do change things, but I am having a hard time imagining things where source code semantics will change enough to where this is an issue. Unless the statement is more that “Version X of GHC requires Version Y of GHC, and compiling with other versions might work but are unsupported”