====================================================== ZEPHYR v0.2 — a self-hosting systems language windows x86-64 · compiles itself · outruns C and Rust ====================================================== zc is written in Zephyr, carries its own assembler and PE linker, rebuilds itself in 0.12s, and imports exactly one DLL. scroll to read the manual, or watch it compile below.
struct Point { x: float, y: float } impl Point { fn len(self) -> float { return sqrt(self.x*self.x + self.y*self.y) } } let p = Point{x: 3.0, y: 4.0} print("len = {p.len()}")
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
| rebuilds itself | 0 s |
| reproducible | 1:1 |
| frontend / 10k lines | 0 ms |
| DLL imports | 0 · kernel32 |
A conservative mark-sweep GC reclaims memory, indexing is bounds-checked, every variable is initialized. No pointers, no malloc/free, no null.
// 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
Same algorithm in all three languages, byte-identical output verified, then timed. Integer matmul, 768×768, best-of-7 on Zen5:
No gcc, no ld, no external assembler in the pipeline. zc owns every stage — and a --rt build imports only kernel32.dll.
lexer -> parser -> types -> codegen x86-64 -> peephole -> assembler -> PE linker -> app.exe // imports: kernel32.dll
$ zc --rt hello.zeph hello.exe $ .\hello.exe Hello from Zephyr!