
To be fair, these 699 MB worth of source code contain all the sources required to build Rust, including some 10 million lines of LLVM code and three different versions of OpenSSL.
Well, it's true. All the sources are included, but not the binary Rust compiler (and the cargo binary), both of which are required to build Rust from source!!! Wait, what? Isn't there a chicken and egg problem? We are actually trying to build Rust from source...!? Yes, there is.
Now let's compile Rust! As Rust 1.84.1 did not build (some kind of error message after 2 hours into the build IIRC), I tried to build Rust 1.81 instead.
Here is the build time for Rust 1.81. Sit down please:
12563 seconds, or 3 hours and 30 minutes.
OCaml builds in 197 seconds, or 3 minutes and 17 seconds. On the same machine, obviously.
That's a factor of 63 times slower than OCaml, or 162 times slower than Python, or 4753 times slower than Lua.
To be fair, the build time of Rust includes building LLVM, cargo and some other tools, and it builds Rust at least twice: stage1 is the Rust 1.81 compiler built with the Rust 1.80 bootstrap, while stage2 is using stage1 (1.81) to build itself again.
Note that a significant part of the problem, and why bootstrapping Rust is so expensive, is that each version of Rust must be bootstrapped with exactly the previous version.
Me wondering why people call Rust a systems programming language when getting to the system from source requires multiple weeks of compiling only to be entirely dependent on statically linked binaries from 100s and 100s of dependents from dozens and dozens of vendors in a centralized npm-type site (No CPP boost, Maven Central, or decentralized management here).
You can't even do builds of Rust crates without running a package repository server.