I opened rust-lang/rust during a coding break after seeing a burst of activity around the repository. I was not expecting a quick application build; I wanted to see how the project feels as a performance-sensitive systems codebase.
The first friction point was conceptual: this is not a normal Cargo workspace. Running cargo build from the repository root is the wrong entry point. The compiler uses its own bootstrap driver, x.py, because building rustc involves staged compilation, compiler artifacts, standard libraries, tests, and optional LLVM integration.
The second gotcha was less obvious: the setup script does not replace the need for the correct host dependencies. On Linux, a missing Python 3 installation or incomplete linker setup can turn the first build into a confusing failure before Rust code is even compiled. The initial build is also large enough that treating it like a typical crate gives misleading expectations about cold-start time and disk usage.
The clean path was:
git clone https://github.com/rust-lang/rust.git
cd rust
./x.py setup user
./x.py build library/std
For a compiler-focused build, I used:
./x.py build compiler/rustc
After that, incremental rebuilds felt much more representative. The bootstrap overhead is significant, but the architecture makes the tradeoff visible: staged compilation adds build latency and consumes resources, while enabling the compiler to validate changes against the toolchain that will actually produce downstream binaries.
What pleasantly surprised me was how coherent the repository feels once x.py is treated as the front door. The build system exposes the real cost centers instead of hiding them behind a thin command wrapper. That matters when evaluating runtime latency, memory behavior, concurrency primitives, and generated-code quality.
The takeaway: watch out if you expect Cargo-only workflows or fast first builds. Watch even more closely if you are measuring performance from a cold checkout. For compiler work, rust-lang/rust is powerful and unusually transparent—but its bootstrap model is part of the system, not incidental setup friction.