What is Zig written in?

Year 2016 Paradigm imperative, systems Typing static Self-hosting yes
The Zig compiler is written in C++, Zig, and LLVM (documented). It has been rewritten in Zig. Zig is self-hosting.

Relationship Graph

All directly connected languages. Click any node to navigate to its page.

Compiler Implementation

LanguageConfidenceNotesSource
C++ 95% Zig originally written in C++ before self-hosting Source
Zig 95% Zig became self-hosting in 2022, dropped C++ compiler Source
LLVM 92% Early Zig used LLVM, now has own backend option Source

Rewritten In

LanguageConfidenceNotesSource
Zig 95% Zig compiler rewritten from C++ to Zig Source

Influenced By

Frequently Asked Questions

What language is Zig written in?
Zig is primarily implemented in C++ and Zig and LLVM. See the implementation section above for details and source references.
What languages influenced Zig?
Zig was influenced by Rust, C among others. See the influence section above for the full list.
Is Zig self-hosting?
Yes, Zig is self-hosting — its compiler can compile itself.

Evidence Sources

Related Languages

Explore Zig in Graph →