What is roc using zig for? I see it mentioned often.
that is a frequently asked question!
literally :grinning_face_with_smiling_eyes:
https://github.com/roc-lang/roc/blob/main/FAQ.md#why-does-roc-use-both-rust-and-zig
(I also just gave a conference talk about this, but the video won't be out for a few months)
RTFFAQ, lakin. :stuck_out_tongue:
to be fair, nobody is expected to read the whole FAQ haha
Now that I've read the FAQ, I can no longer tell myself that Roc stands for "Richard's O.G. Compiler" and have to admit it's named after a bird. But it definitely answered my question about Zig
there's a joke I've heard that "ELM" is short for "Evan's ML" and "ROC" is short for "Richard's OCaml" :stuck_out_tongue:
I should learn OCaml
Do you plan to convert all of Roc's compiler to Zig?
The FAQ says no.
The split of Rust for the compiler and Zig for the standard library has worked well so far, and there are no plans to change it.
Lakin Wecker said:
I should learn OCaml
Although learning zig is probably a better use of my time.
Declan Joseph Maguire said:
Do you plan to convert all of Roc's compiler to Zig?
Zig is only used for built-in functions in the standard library.
The compiler itself is 100% Rust, 0% Zig! And there is no plan to change that!
Zig is also a great way to make a platform in my opinion. It is pretty flexible, particularly if you already have libraries in C or C++ you can use.
Last updated: Jul 05 2025 at 12:14 UTC