What is a Self-Hosting Compiler?

A self-hosting compiler is a compiler that can compile the source code of its own compiler. This means the language implementation is written in the language itself.

What Self-Hosting Means

If a language is self-hosting, its compiler source code is written in that same language. For example, the Rust compiler (rustc) is written in Rust. The GHC Haskell compiler is written in Haskell.

Benefits of Self-Hosting

Self-Hosting vs. Bootstrapping

Bootstrapping is the process of achieving self-hosting. A self-hosting language is the result. Not all languages are self-hosting — many interpreters are written in C and never become self-hosting.

Explore in Graph →