What is Roc written in?
Roc is a functional programming language, first released in 2019.
Implementation
| Layer | Written in | Notes |
|---|---|---|
| Compiler | Rust | Roc's compiler was originally written in Rust, from the project's start until the 2025 rewrite to Zig. |
| Compiler | Zig (since 2025) | Roc's compiler was rewritten from Rust to Zig starting 2025, announced by creator Richard Feldman, for faster incremental builds and simpler memory management. |
Compiler implementation
The Roc compiler, written in Zig, translates Roc source code into an executable or intermediate format. The choice of implementation language affects the compiler's portability, build-time dependencies, and the path toward Roc eventually becoming self-hosting.
Many language compilers are written in C or C++ for maximum portability and performance. When a compiler is written in a higher-level language, it can leverage that language's abstractions for clearer compiler code, at the cost of a longer bootstrap dependency chain.
Explore in the Graph
See Roc's full lineage, including all implementation and influence relationships, in the interactive graph.
Open Interactive Graph →Or view the Roc language page for the complete record.