# Roc lang to be rewritten in Zig

**URL:** <https://ziggit.dev/t/roc-lang-to-be-rewritten-in-zig/8363>\
**Category:** News\
**Created:** [February 4, 2025, 8:55pm UTC](https://ziggit.dev/t/roc-lang-to-be-rewritten-in-zig/8363 "2025-02-04T20:55:12Z")\
**Posts on this page:** 10\
**Page:** 1

<div class="post-metadata">

**Author:** ![yamafaktory](https://ziggit.dev/user_avatar/ziggit.dev/yamafaktory/32/7689_2.png) [@yamafaktory](https://ziggit.dev/u/yamafaktory)\
**Post date:** [February 4, 2025, 8:55pm UTC](https://ziggit.dev/t/roc-lang-to-be-rewritten-in-zig/8363/1 "2025-02-04T20:55:12Z")

</div>

> <https://gist.github.com/rtfeldman/77fb430ee57b42f5f2ca973a3992532f>

---

<div class="post-metadata">

**Author:** ![Calder-Ty](https://ziggit.dev/user_avatar/ziggit.dev/calder-ty/32/10237_2.png) [@Calder-Ty](https://ziggit.dev/u/Calder-Ty)\
**Post date:** [February 4, 2025, 10:14pm UTC](https://ziggit.dev/t/roc-lang-to-be-rewritten-in-zig/8363/2 "2025-02-04T22:14:02Z")

</div>

> A frustratingly common response I’ve heard to this complaint is that “several seconds is not as bad as [some other language or some other project that has minutes-long build times]!” I don’t care if things could be even worse, I care that I’m feeling this pain while knowing I don’t have to. Zig’s x86-64 backend can reportedly scratch-build (without anything cached) the entire 300K-line Zig compiler code base in a second or two. It takes us longer than that to build one of our medium-sized Rust crates, and that’s even _with_ the benefit of caching.

I can be sympathetic to that frustration. However is it True that zig can build itself that fast? I’ve never actually built zig, just used the distributed binary.

---

<div class="post-metadata">

**Author:** ![tobyjaffey](https://ziggit.dev/user_avatar/ziggit.dev/tobyjaffey/32/3790_2.png) [@tobyjaffey](https://ziggit.dev/u/tobyjaffey)\
**Post date:** [February 4, 2025, 10:16pm UTC](https://ziggit.dev/t/roc-lang-to-be-rewritten-in-zig/8363/3 "2025-02-04T22:16:07Z")

</div>

This video (which I watched yesterday by coincidence) explains a lot of the thinking here about how Zig is used in the Roc compiler. [https://youtu.be/jIZpKpLCOiU?si=T1TZRN-DzFNCeWmQ](https://youtu.be/jIZpKpLCOiU?si=T1TZRN-DzFNCeWmQ)

---

<div class="post-metadata">

**Author:** ![TUSF](https://ziggit.dev/user_avatar/ziggit.dev/tusf/32/456_2.png) [@TUSF](https://ziggit.dev/u/TUSF)\
**Post date:** [February 4, 2025, 10:16pm UTC](https://ziggit.dev/t/roc-lang-to-be-rewritten-in-zig/8363/4 "2025-02-04T22:16:16Z")

</div>

Presumably, he’s talking about the custom x86\_64 backend, which is only for debug builds, does not use LLVM directly, and doesn’t support a number of things, afaik, but it is extremely fast to compile, otherwise.

---

<div class="post-metadata">

**Author:** ![pierrelgol](https://ziggit.dev/user_avatar/ziggit.dev/pierrelgol/32/10233_2.png) [@pierrelgol](https://ziggit.dev/u/pierrelgol)\
**Post date:** [February 5, 2025, 6:51am UTC](https://ziggit.dev/t/roc-lang-to-be-rewritten-in-zig/8363/5 "2025-02-05T06:51:36Z")

</div>

yes I’ve tried it and it’s really fast, even on my laptop which isn’t a beast by any stretch of the imagination it’s really good.

---

<div class="post-metadata">

**Author:** ![gonzo](https://ziggit.dev/user_avatar/ziggit.dev/gonzo/32/54_2.png) [@gonzo](https://ziggit.dev/u/gonzo)\
**Post date:** [February 5, 2025, 8:01am UTC](https://ziggit.dev/t/roc-lang-to-be-rewritten-in-zig/8363/6 "2025-02-05T08:01:57Z")

</div>

Love these news. Left a comment in the gist too.

---

<div class="post-metadata">

**Author:** ![pierrelgol](https://ziggit.dev/user_avatar/ziggit.dev/pierrelgol/32/10233_2.png) [@pierrelgol](https://ziggit.dev/u/pierrelgol)\
**Post date:** [February 5, 2025, 10:52am UTC](https://ziggit.dev/t/roc-lang-to-be-rewritten-in-zig/8363/7 "2025-02-05T10:52:50Z")

</div>

I think it’s pretty close to parity to other backends in term of features support, at least on the issue tracking, there isn’t much left to implement for parity 🙂

---

<div class="post-metadata">

**Author:** ![mperillo](https://ziggit.dev/user_avatar/ziggit.dev/mperillo/32/1280_2.png) [@mperillo](https://ziggit.dev/u/mperillo)\
**Post date:** [February 10, 2025, 11:12am UTC](https://ziggit.dev/t/roc-lang-to-be-rewritten-in-zig/8363/8 "2025-02-10T11:12:42Z")

</div>

This video may be related:

> **[Performance Excuses Debunked](https://www.computerenhance.com/p/performance-excuses-debunked)**
>
> There are many legitimate arguments to be had about performance, but there are also plain old excuses. It's time to end the excuses.

---

<div class="post-metadata">

**Author:** ![kristoff](https://ziggit.dev/user_avatar/ziggit.dev/kristoff/32/9_2.png) [@kristoff](https://ziggit.dev/u/kristoff)\
**Post date:** [February 10, 2025, 8:34pm UTC](https://ziggit.dev/t/roc-lang-to-be-rewritten-in-zig/8363/9 "2025-02-10T20:34:51Z")

</div>

I interviewed Richard Feldman on the rewrite today on Zig SHOWTIME.

[![](https://ziggit.dev/uploads/default/original/2X/7/73793099bc1e43aabe8b8cebc6dc203dacf7bacc.jpeg "[#38] Rewriting Roc with Richard Feldman") ](https://www.youtube.com/watch?v=WU45hNi_s7Y)

---

<div class="post-metadata">

**Author:** ![yamafaktory](https://ziggit.dev/user_avatar/ziggit.dev/yamafaktory/32/7689_2.png) [@yamafaktory](https://ziggit.dev/u/yamafaktory)\
**Post date:** [February 10, 2025, 8:36pm UTC](https://ziggit.dev/t/roc-lang-to-be-rewritten-in-zig/8363/10 "2025-02-10T20:36:43Z")

</div>

Awesome! Adding this gem to my watchlist! Thanks!
