Internals

Maylang is a self-hosted compiler with its own backend. These pages explain the parts that are unusual enough to be worth a diagram.

Bootstrap in one paragraph

The Rust workspace builds a C compiler, which builds stage 1 of the self-hosted compiler. Stage 1 builds stage 2, and stage 2 builds stage 3. The build is complete only when stage 2 and stage 3 are byte-identical. That fixpoint is what makes the self-hosted claim checkable: the compiler can rebuild itself without a second implementation in the loop.

Reading the source

The compiler lives in compiler/mayc. The runtime is in compiler/mayc/runtime. Backend reports and measured samples are under compiler/mayc/tests/backend/. Design notes live in docs/design/ and docs/internals/.