What is Rust written in?

Rust is self-hosting: the Rust compiler (rustc) is written in Rust. The first version of rustc was written in OCaml; Rust became self-hosting in 2011. mrustc is an alternative Rust compiler written in C++ that can bootstrap rustc from source.

Details

Rustc, the official Rust compiler, is written in Rust — making it a self-hosting compiler. Self-hosting means the compiler can compile its own source code.

The bootstrap chain works roughly as follows: a previous version of rustc (or mrustc) compiles the current rustc source. This allows Rust to evolve without depending on another language for its compiler.

The dataset records a bootstrap_written_in relationship showing Rust's self-hosting bootstrap chain, and a historical compiler_written_in relationship from OCaml representing the original implementation.

Explore in the Graph

See implementation and influence relationships interactively.

Open Interactive Graph →

Related Pages