Roc Compiler: 300K Lines Rust-to-Zig Rewrite Hits Feature Parity

Original: How Our Rust-to-Zig Rewrite Is Going

Why This Matters

Demonstrates real-world trade-offs of Rust vs. Zig for systems-level compiler development at scale.

The Roc programming language team announced on July 15, 2026 that its 487-day rewrite of 300,000 lines of Rust code into Zig has reached feature parity with the original compiler, enabling a WebAssembly game demo and a new homepage interactive editor.

The team behind the Roc programming language compiler has spent approximately 487 days rewriting its 300,000-line Rust codebase in Zig, and has now reached feature parity with the original implementation. The milestone was demonstrated by successfully compiling Rocci Bird, a WASM-4 game under 1,000 lines of Roc code, using the new compiler. Notably, `roc build --opt=size` now produces a 31KB WebAssembly binary—less than half the size generated by the original compiler. The team also launched an in-browser Roc editor on roc-lang.org, powered by a 2.5MB WebAssembly binary. The rewrite took 476 days longer than Bun's comparable 11-day Zig-to-Rust port of ~500K lines, though the team notes their rewrite involved architectural changes rather than a direct translation. A formal v0.1.0 release is targeted for later in 2026. Key contributors cited include Anton-4, Luke Boswell, Jared Ramirez, and Ayaz Hafiz, with sponsors including rwx, Lambda Class, and NoRedInk.

Source

rtfeldman.com — Read original →