Skip to content

← All updates

release

Update 19: Self-hosting underway

The compiler is being rewritten in the language it compiles, and the milestone numbers are real.

  • 10 of 10 rewritten modules compile. Token, diagnostics, JSON, formatter, AST, lexer, parser, IR, typechecker, and lowerer: 22,526 lines of Rust have become 18,329 lines of Fid.
  • The parser (parser.fd, 4,989 lines, 91 functions) compiles to a 384KB native executable via fidesc build: no assembler, no linker, no C compiler.
  • The lexer and formatter are verified: both produce output identical to their Rust counterparts across all 240 test files.
  • The IR module is done: 25 tests passing on the interpreter, C codegen, and PE emitter.
  • The typechecker (4,813 lines) and lowerer build to native binaries; differential testing against the Rust originals is the next step.

Still ahead: the monomorphizer and borrow checker rewrites, then the back end, then the bootstrap moment: Fid compiling Fid compiling Fid, with a diff proving the fixed point. Dogfooding at this scale is already paying off: every compiler bug the rewrite surfaces (cross-module import resolution, enum-in-struct-in-Vec codegen) goes straight onto the fix list.