Is rustc written in Rust?
Yes, rustc (the official Rust compiler) is written entirely in Rust. It is a self-hosting compiler, meaning it compiles its own source code.
Details
The Rust compiler, rustc, is a classic example of a self-hosting compiler. The source code for rustc is written in Rust, and it uses an older version of itself (a bootstrap compiler) to compile the newest version.
However, rustc relies on LLVM as its backend to generate optimized machine code. LLVM itself is written in C++.
Explore in the Graph
See implementation and influence relationships interactively.
Open Interactive Graph →