Zephyrcompilesitself.
zc is written in Zephyr, carries its own assembler and PE linker, and rebuilds itself in 0.12 seconds — then beats C and Rust on real workloads. Watch it happen:
Source to
executable.
Nothing borrowed.
A one-time C seed produced the first binary. gcc has been out of the loop ever since — zc.zeph compiles itself to a byte-for-byte identical zc.exe.
$ zc --rt zc.zeph zc2.exe lex + parse ....... 10,012 lines type check ........ ok codegen x86-64 .... 214 KB assemble .......... in-house link PE ........... zc2.exe total ............. 0.12 s $ fc /b zc.exe zc2.exe FC: no differences encountered
Memory safe.
No borrow
checker.
A conservative mark-sweep GC reclaims memory, indexing is bounds-checked, every variable is initialized. No pointers, no malloc/free, no null. The whole class of memory bugs is simply unrepresentable.
// use-after-free ...... impossible // double-free ......... impossible // buffer overrun ...... bounds-checked // null deref .......... no null exists // uninitialized read .. every var init'd let v = xs.get(9).or(0) // absence, no panic
Faster than C.
We show the
checksums.
Same algorithm in all three languages, byte-identical output verified, then timed. Integer matmul, 768×768, best-of-7 on Zen5:
One DLL.
Our own
linker.
No gcc, no ld, no external assembler in the pipeline. zc owns every stage — and a --rt build imports only kernel32.dll. Nothing else.
lexer → parser → types → codegen x86-64 → peephole → assembler → PE linker → app.exe // imports: kernel32.dll
Build something
that builds
itself.
$ zc --rt hello.zeph hello.exe $ .\hello.exe Hello from Zephyr!