Elevator Pitch
- Roc’s team has reached feature parity after a 1.5-year Rust-to-Zig compiler rewrite, unlocking new developer ergonomics and performance wins while reflecting candidly on tradeoffs vs. Rust.
Key Takeaways
- The new Zig-based compiler hit feature parity and already enables features like hot code loading, cross-compilation reproducibility, and allocation-free HTTP route matching via pattern interpolation.
- Zig’s strengths for Roc center on build tooling, allocator-centric APIs, and data-layout control; memory-safety outcomes so far have been acceptable, with most “memory corruption” reports being miscompilations rather than compiler bugs.
- Rust is still missed for some ergonomics (notably in tests, polymorphism traits, private fields, and backwards compatibility), but Zig is preferred overall for this project’s constraints.
Most Memorable Quotes
- “We recently passed an exciting milestone: feature parity with the original compiler!”
- “Not only is this type-safe at compile time, this entire code snippet performs zero heap allocations.”
- “
zig build --watch -fincremental can rebuild a change to our current ~450K lines of Zig code in about 35 milliseconds.”
Source URL•Original: 6255 words
•Summary: 173 words