Roc Compiler's Rewriting Journey: From Rust to Zig

2025-02-04
Roc Compiler's Rewriting Journey: From Rust to Zig

The Roc programming language compiler team has embarked on a significant undertaking: rewriting their 300K-line Rust compiler in Zig. This isn't a simple language port; it's a strategic move to address Rust's slow compilation times and accumulated technical debt. The rewrite will improve the parser, formatter, canonicalization, documentation generation, type inference, and LLVM code generation, among other modules. They also plan to use an interpreter for the development backend, significantly speeding up the development loop. The ultimate goal is to improve compilation speed, enhance maintainability, and release Roc 0.1.0.

Development rewrite