A self-compiling SIR-to-WebAssembly compiler written entirely in SIR itself (~103 KB WASM binary, proven byte-for-byte self-compilation fixpoint, 253/253 test suite passing) — serving as live empirical proof of the STF/SIR architecture's resilience.
The compiler source is authored in SIR and lowers directly into a compact, zero-dependency ~103 KB WebAssembly binary containing the full lexer, STF/SIR tree parser, semantic validator, and WASM binary emitter.
When the compiled WebAssembly binary compiles its own SIR source code, the resulting stage-2 and stage-3 WASM binaries match byte-for-byte — demonstrating a deterministic self-compilation fixpoint.
Verified across a comprehensive 253-test verification suite covering grammar edge cases, control flow, memory layout, type checking, and multi-stage bootstrap reproducibility.
Any language looks easy when a frontier model edits a 50-line snippet with the full language manual in prompt. The real test of an agent-native intermediate representation is whether weaker or mid-tier models can build and maintain a complex, self-hosting compiler over long multi-session runs.
The complete SIR source code of the compiler, WebAssembly bootstrap artifacts, and the 253-test verification suite are publicly available on GitHub:
https://github.com/ais-space/sir-compiler → Explore Sir Revizor Code Monitoring →