The Zig self-hosted compiler codebase consists of 197,549 lines of code.
There are several different backends, each at varying levels of completion. Here is how many behavior tests are passing:
LLVM: 1101/1138 (97%)
WASM: 919/1138 (81%)
C: 740/1138 (65%)
x86_64: 725/1138 (64%)
arm: 490/1138 (43%)
aarch64: 411/1138 (36%)
As you might guess, the one that this milestone is celebrating is the LLVM backend, which is now able to compile the compiler itself, despite 3% of the behavior tests not yet passing.The new compiler codebase, which is written in Zig instead of C++, uses significantly less memory, and represents a modest performance improvement. There are 5 more upcoming compiler milestones which will have a more significant impact on compilation speed. I talked about this in detail last weekend at the Zig meetup in Milan, Italy[1].
There are 3 main things needed before we can ship this new compiler to everyone.
1. bug fixes
2. improved compile errors
3. implement the remaining runtime safety checks
If you're looking forward to giving it a spin, subscribe to [this issue](https://github.com/ziglang/zig/issues/89) to be notified when it is landed in master branch.
Edit: The talk recording about upcoming compiler milestones is uploaded now [1]