Roc version 0.1.0, eight years in the making
November 30, 2026
After eight years of development, the Roc programming language has its first numbered release: version 0.1.0!
There are too many contributors to thank for all their incredible work on the road to this milestone, but I at least want to mention (in alphabetical order) Agus Zubiaga, Anthony Bullard, Anton-4, Aurélien Geron, Ayaz Hafiz, Brendan Hansknecht, Brian Carroll, Folkert de Vries, Hannes, Jack Scully, Jared Ramirez, Jasper Woudenberg, Jelle Teeuwissen, Josh Warner, JRI98, Luke Boswell, MagicMan, Niclas Åhdén, Sam Mohr, Stephan, and Steve Howell.
Thank you all so much!
What is Roc?
Roc is a programming language with the tagline fast, friendly, functional.
It's designed to build faster than Go and output programs that run nearly as fast as Rust, with user-friendly tooling and a friendly community, plus security and reliability guarantees you can't find in any mainstream language today. Roc hasn't achieved all of its goals yet (version 0.1 is not 1.0!) but as you'll see, 0.1.0 has a lot.
Roc 0.1.0 compiles to standalone binaries (with hot reloading out-the-box) or to WebAssembly, it combines Hindley-Milner type inference with purity inference and static dispatch, and uses a novel system of platforms and applications to let you build on lower-level languages without a FFI compromising guarantees.
I started designing the language in 2018 with a goal of making an Elm-inspired experience for "the long tail of use cases." Back then, Elm was focused only on user interfaces, although now with Acadia its scope has expanded—check it out if you haven't already! Roc has evolved its own character over time, so although the languages still have much in common, there are some obvious differences too.
I made the first compiler commit in 2019, and talked about the project publicly in 2020. More contributors got involved then, leading to promising early results that I spoke about at Strange Loop 2021. We incorporated research from the Koka and Morphic languages, but hit a major architectural problem along the way, which I talked about in detail with Ayaz Hafiz in 2024. This led to a 2025 scratch-rewrite of the compiler, which we completed earlier in 2026.
Many details in the language's design changed over those years, yet the types in the standard library still look about how they did in my 2018 sketches. (One of the reasons for holding off on making a numbered release was to set a clear expectation not to expect stability. Things are much more stable these days!)
There's more detail about language specifics below, as well as a showcase of projects community members have built. But first, some numbers!
Fast Programs
One of Roc's goals is to approach the performance of speed-focused languages like Rust and C++, without quite matching it (since Roc does automatic memory management and is stricter about memory safety than Rust, and both of those design choices have runtime performance costs). So how close can Roc get?
Here are some performance benchmarks across four community projects. Each includes a comparison to Rust or C, and all were built with the highest levels of optimization in their respective compilers.
roc-deflate
In How close can pure FP get to C?, I compared Niclas Åhdén's roc-deflate with C's libdeflate across 144 compression benchmarks. You can read more about these measurements in that article, but the quick summary is that roc-deflate had a median slowdown (compared to libdeflate) of 2.6% on an M1 MacBook Pro and 8.9% on a Ryzen 3900X. Here's the main chart from that article:
#### Compression on Silesia corpus
M1 MacBook Pro Ryzen 3900X Ubuntu
MB/s
L1
L2
L3
L4
L5
L6
L7
L8
L9
L10
L11
L12
libdeflateroc-deflate
Compression Level
MB/s
L1
L2
L3
L4
L5
L6
L7
L8
L9
L10
L11
L12
libdeflateroc-deflate
Compression Level
roc-redis
Jared Ramirez included benchmarks in the README of his roc-redis package. I plotted them here with Rust's redis-rs as the dashed red baseline, and the other libraries' numbers converted to percentages of redis-rs. (Higher is better.)
#### Redis client throughput
roc-redisgo-redisredis-pyredis-rs
Throughput vs. redis-rs
0%
10%
20%
30%
40%
50%
60%
70%
80%
90%
100%
ping_sequential
set_get_sequential
incr_sequential
ping_pipeline
mset_mget_sequential
hash_roundtrip_sequential
set_get_pipeline
roc-redis on ping_sequential
91.8% of redis-rs throughput
go-redis on ping_sequential
76.0% of redis-rs throughput
redis-py on ping_sequential
29.7% of redis-rs throughput
roc-redis on set_get_sequential
93.5% of redis-rs throughput
go-redis on set_get_sequential
79.2% of redis-rs throughput
redis-py on set_get_sequential
29.8% of redis-rs throughput
roc-redis on incr_sequential
92.6% of redis-rs throughput
go-redis on incr_sequential
78.7% of redis-rs throughput
redis-py on incr_sequential
32.1% of redis-rs throughput
roc-redis on ping_pipeline
96.3% of redis-rs throughput
go-redis on ping_pipeline
91.8% of redis-rs throughput
redis-py on ping_pipeline
10.0% of redis-rs throughput
roc-redis on mset_mget_sequential
92.7% of redis-rs throughput
go-redis on mset_mget_sequential
81.4% of redis-rs throughput
redis-py on mset_mget_sequential
29.8% of redis-rs throughput
roc-redis on hash_roundtrip_sequential
94.4% of redis-rs throughput
go-redis on hash_roundtrip_sequential
80.5% of redis-rs throughput
redis-py on hash_roundtrip_sequential
29.7% of redis-rs throughput
roc-redis on set_get_pipeline
91.2% of redis-rs throughput
go-redis on set_get_pipeline
95.8% of redis-rs throughput
redis-py on set_get_pipeline
11.3% of redis-rs throughput
roc-regex
Karl's roc-regex technically benchmarks faster than the popular regex Rust crate, but it's not an apples-to-apples comparison. Karl used a matching algorithm based on RE#, which differs from how regex is implemented in ways that favor the RE# algorithm on these particular inputs. Still, both packages get identical answers across all inputs in this benchmark. (Lower is better.)
#### Regular expression matching
roc-regexregexcrate
Matching time vs. regex crate
0%
20%
40%
60%
80%
100%
120%
Holmes
Moriarty
8-name alternation
[A-Za-z]+
[0-9]{2,4}
\bthe\b
\w+\s+\w+
(\w+)@(\w+)
\p{L}+
.*Holmes
roc-regex matching Holmes
26.54 μs (96% of regex)
(minimum across five runs)
roc-regex matching Moriarty
9.69 μs (98% of regex)
(minimum across five runs)
roc-regex matching 8-name alternation
411.99 μs (97% of regex)
(minimum across five runs)
roc-regex matching [A-Za-z]+
1,041.30 μs (47% of regex)
(minimum across five runs)
roc-regex matching [0-9]{2,4}
58.83 μs (55% of regex)
(minimum across five runs)
roc-regex matching \bthe\b
175.63 μs (93% of regex)
(minimum across five runs)
roc-regex matching \w+\s+\w+
1,093.57 μs (71% of regex)
(minimum across five runs)
roc-regex matching (\w+)@(\w+)
62.63 μs (91% of regex)
(minimum across five runs)
roc-regex matching \p{L}+
1,260.14 μs (61% of regex)
(minimum across five runs)
roc-regex matching .*Holmes
238.12 μs (37% of regex)
(minimum across five runs)
roux webserver
Zak Kohler built roux on top of his Zig webserver, fourneau. He benchmarked it against Rust's popular axum crate as well as a vanilla Go webserver. This chart uses his November 28 benchmarks, and his Drag Race Page updates nightly with fresh measurements using the latest roux and fourneau. (Higher is better.)
#### HTTP server throughput
rouxfourneau-ziggoaxum
Throughput vs. axum
0%
25%
50%
75%
100%
125%
150%
175%
Echo 4 KiBConnection churnSSE (Datastar)PlaintextPlaintext (h2c)Templates
axum · Echo 4 KiB
77,950 req/s (100%)
(best of three runs)
fourneau-zig · Echo 4 KiB
74,510 req/s (96% of axum)
(best of three runs)
go · Echo 4 KiB
45,396 req/s (58% of axum)
(best of three runs)
roux · Echo 4 KiB
77,576 req/s (100% of axum)
(best of three runs)
axum · Connection churn
14,730 req/s (100%)
(best of three runs)
fourneau-zig · Connection churn
14,550 req/s (99% of axum)
(best of three runs)
go · Connection churn
7,458 req/s (51% of axum)
(best of three runs)
roux · Connection churn
14,621 req/s (99% of axum)
(best of three runs)
axum · SSE (Datastar)
99,010 req/s (100%)
(best of three runs)
fourneau-zig · SSE (Datastar)
136,931 req/s (138% of axum)
(best of three runs)
go · SSE (Datastar)
19,736 req/s (20% of axum)
(best of three runs)
roux · SSE (Datastar)
139,933 req/s (141% of axum)
(best of three runs)
axum · Plaintext
236,522 req/s (100%)
(best of three runs)
fourneau-zig · Plaintext
354,305 req/s (150% of axum)
(best of three runs)
go · Plaintext
69,886 req/s (30% of axum)
(best of three runs)
roux · Plaintext
361,682 req/s (153% of axum)
(best of three runs)
axum · Plaintext (h2c)
244,087 req/s (100%)
(best of three runs)
fourneau-zig · Plaintext (h2c)
383,439 req/s (157% of axum)
(best of three runs)
go · Plaintext (h2c)
74,426 req/s (30% of axum)
(best of three runs)
roux · Plaintext (h2c)
391,028 req/s (160% of axum)
(best of three runs)
axum · Templates
38,710 req/s (100%)
(best of three runs)
fourneau-zig · Templates
63,443 req/s (164% of axum)
(best of three runs)
go · Templates
1,875 req/s (5% of axum)
(best of three runs)
roux · Templates
49,569 req/s (128% of axum)
(best of three runs)
Fast Feedback Loops
Roc is designed not only to run fast, but also to provide fast feedback loops.
Instead of sharing laboratory benchmarks on build times, I decided to ask the community what projects of theirs I could share in this post. Some posted their own build times, and others I measured on my own machine. (A few of the projects were commercial and proprietary, so I don't have access to the code.)
Terminology note: a "cold" build has no on-disk cache yet, a "warm" build has been built once before (and so benefits from the cache), "root changed" means a rebuild after only the root module changed (meaning every other module can be loaded from cache; this is almost the best-case scenario for caching), and "import changed" means a rebuild after a heavily-imported module changed, which would invalidate a bunch of cached modules and bring the overall build time closer to the cold build time.
roc check does type-checking and compile-time evaluation and reports errors, roc build --opt=dev does everything roc check does, and then also outputs a binary (a development build without optimizations, because of --opt=dev), and roc test runs tests as well.
Here are the results:
### roc check on real-world code bases
- Cold
- Warm
- Root changed
- Import changed
roc check wall time
0
200 ms
400 ms
600 ms
800 ms
1 s
0
10k
20k
30k
40k
50k
60k
70k
Lines of code including dependencies
lukewilliamboswell/roc-graph-layout · cold
874 ms · 66,168 lines
(median across five runs)
roxum/ddd · cold
560 ms · 11,896 lines
(median across three runs)
roxum/middleware · cold
530 ms · 10,501 lines
(median across three runs)
grayrest/roc-regex · cold
509 ms · 17,408 lines
(median across five runs)
lukewilliamboswell/roc-font · cold
489 ms · 29,118 lines
(median across five runs)
roxum/hello · cold
470 ms · 10,159 lines
(median across three runs)
lukewilliamboswell/weaver · cold
399 ms · 15,470 lines
(median across five runs)
lukewilliamboswell/roc-ray · cold
398 ms · 18,856 lines
(median across five runs)
showell/roc-apps · cold
344 ms · 4,371 lines
(median across five runs)
showell/roc-markdown · cold
329 ms · 6,241 lines
(median across five runs)
lukewilliamboswell/plume · cold
319 ms · 12,951 lines
(median across five runs)
lukewilliamboswell/roc-automation · cold
294 ms · 9,239 lines
(median across five runs)
lukewilliamboswell/roc-time · cold
249 ms · 13,822 lines
(median across five runs)
grayrest/roc-regex · import changed
218 ms · 17,408 lines
(median across five runs)
grayrest/roc-regex · root changed
201 ms · 17,408 lines
(median across five runs)
lukewilliamboswell/roc-font · import changed
185 ms · 29,118 lines
(median across five runs)
lukewilliamboswell/roc-time · import changed
88.1 ms · 13,822 lines
(median across five runs)
showell/roc-markdown · import changed
83.7 ms · 6,241 lines
(median across five runs)
showell/roc-apps · import changed
81.6 ms · 4,371 lines
(median across five runs)
lukewilliamboswell/roc-graph-layout · import changed
79.3 ms · 66,168 lines
(median across five runs)
lukewilliamboswell/roc-graph-layout · root changed
62.3 ms · 66,168 lines
(median across five runs)
lukewilliamboswell/plume · import changed
61 ms · 12,951 lines
(median across five runs)
lukewilliamboswell/weaver · import changed
59.7 ms · 15,470 lines
(median across five runs)
showell/roc-apps · root changed
52.5 ms · 4,371 lines
(median across five runs)
lukewilliamboswell/roc-font · root changed
48.5 ms · 29,118 lines
(median across five runs)
rocco/widgets · cold
46 ms · 3,740 lines
(median across three runs)
rocco/pong · cold
41 ms · 3,583 lines
(median across three runs)
lukewilliamboswell/weaver · root changed
30.6 ms · 15,470 lines
(median across five runs)
rocco/primitives · cold
30 ms · 2,134 lines
(median across three runs)
lukewilliamboswell/roc-ray · root changed
28.6 ms · 18,856 lines
(median across five runs)
lukewilliamboswell/roc-automation · root changed
26.9 ms · 9,239 lines
(median across five runs)
lukewilliamboswell/roc-time · root changed
23.8 ms · 13,822 lines
(median across five runs)
lukewilliamboswell/roc-graph-layout · warm
20.8 ms · 66,168 lines
(median across five runs)
lukewilliamboswell/plume · root changed
18.9 ms · 12,951 lines
(median across five runs)
lukewilliamboswell/roc-font · warm
12.2 ms · 29,118 lines
(median across five runs)
ageron/roclet · cold
10.8 ms · 29 lines
(median across five runs)
lukewilliamboswell/plume · warm
10.2 ms · 12,951 lines
(median across five runs)
lukewilliamboswell/weaver · warm
9.9 ms · 15,470 lines
(median across five runs)
lukewilliamboswell/roc-ray · warm
9.9 ms · 18,856 lines
(median across five runs)
ageron/roclet · root changed
9.7 ms · 29 lines
(median across five runs)
lukewilliamboswell/roc-time · warm
9.7 ms · 13,822 lines
(median across five runs)
grayrest/roc-regex · warm
9.5 ms · 17,408 lines
(median across five runs)
showell/roc-markdown · root changed
8.6 ms · 6,241 lines
(median across five runs)
lukewilliamboswell/roc-automation · warm
8.3 ms · 9,239 lines
(median across five runs)
lukewilliamboswell/roc-platform-template-zig · cold
7.6 ms · 106 lines
(median across five runs)
showell/roc-markdown · warm
6.5 ms · 6,241 lines
(median across five runs)
showell/roc-apps · warm
6.3 ms · 4,371 lines
(median across five runs)
lukewilliamboswell/roc-platform-template-zig · root changed
5.7 ms · 106 lines
(median across five runs)
ageron/roclet · warm
4.4 ms · 29 lines
(median across five runs)
lukewilliamboswell/roc-platform-template-zig · warm
4.4 ms · 106 lines
(median across five runs)
### roc build --opt=dev on real-world code bases
- Cold
- Warm
- Root changed
- Import changed
roc build --opt=dev wall time
0
200 ms
400 ms
600 ms
800 ms
1 s
0
10k
20k
30k
40k
50k
60k
70k
Lines of code including dependencies
lukewilliamboswell/roc-graph-layout · cold
985 ms · 66,168 lines
(median across five runs)
roxum/ddd · cold
640 ms · 11,896 lines
(median across three runs)
roxum/middleware · cold
590 ms · 10,501 lines
(median across three runs)
lukewilliamboswell/roc-font · cold
559 ms · 29,118 lines
(median across five runs)
roxum/hello · cold
530 ms · 10,159 lines
(median across three runs)
grayrest/roc-regex · cold
527 ms · 17,408 lines
(median across five runs)
lukewilliamboswell/weaver · cold
441 ms · 15,470 lines
(median across five runs)
lukewilliamboswell/roc-automation · cold
334 ms · 9,239 lines
(median across five runs)
lukewilliamboswell/plume · cold
332 ms · 12,951 lines
(median across five runs)
lukewilliamboswell/roc-time · cold
271 ms · 13,822 lines
(median across five runs)
grayrest/roc-regex · import changed
226 ms · 17,408 lines
(median across five runs)
grayrest/roc-regex · root changed
207 ms · 17,408 lines
(median across five runs)
lukewilliamboswell/roc-font · import changed
204 ms · 29,118 lines
(median across five runs)
lukewilliamboswell/roc-graph-layout · import changed
115 ms · 66,168 lines
(median across five runs)
lukewilliamboswell/roc-graph-layout · root changed
98.6 ms · 66,168 lines
(median across five runs)
lukewilliamboswell/roc-time · import changed
94.8 ms · 13,822 lines
(median across five runs)
lukewilliamboswell/roc-automation · root changed
86.2 ms · 9,239 lines
(median across five runs)
rocco/widgets · cold
86 ms · 3,740 lines
(median across three runs)
lukewilliamboswell/weaver · import changed
84.6 ms · 15,470 lines
(median across five runs)
lukewilliamboswell/roc-font · root changed
81.4 ms · 29,118 lines
(median across five runs)
lukewilliamboswell/roc-graph-layout · warm
80.1 ms · 66,168 lines
(median across five runs)
rocco/pong · cold
73 ms · 3,583 lines
(median across three runs)
lukewilliamboswell/weaver · root changed
63.4 ms · 15,470 lines
(median across five runs)
lukewilliamboswell/plume · import changed
58.1 ms · 12,951 lines
(median across five runs)
rocco/primitives · cold
56 ms · 2,134 lines
(median across three runs)
lukewilliamboswell/roc-font · warm
55.7 ms · 29,118 lines
(median across five runs)
lukewilliamboswell/plume · root changed
38.3 ms · 12,951 lines
(median across five runs)
lukewilliamboswell/roc-time · root changed
26.9 ms · 13,822 lines
(median across five runs)
lukewilliamboswell/weaver · warm
21.5 ms · 15,470 lines
(median across five runs)
lukewilliamboswell/roc-time · warm
18 ms · 13,822 lines
(median across five runs)
grayrest/roc-regex · warm
17.8 ms · 17,408 lines
(median across five runs)
lukewilliamboswell/plume · warm
16.9 ms · 12,951 lines
(median across five runs)
lukewilliamboswell/roc-automation · warm
16.3 ms · 9,239 lines
(median across five runs)
ageron/roclet · cold
14.2 ms · 29 lines
(median across five runs)
ageron/roclet · root changed
13.4 ms · 29 lines
(median across five runs)
ageron/roclet · warm
8.5 ms · 29 lines
(median across five runs)
### roc test on real-world code bases
- Cold
- Warm
- Root changed
- Import changed
roc test wall time
0
500 ms
1 s
1.5 s
2 s
2.5 s
0
10k
20k
30k
40k
50k
60k
Lines of code including dependencies
lukewilliamboswell/roc-blueprint · cold
2.242 s · 14,460 lines
(median across five runs)
lukewilliamboswell/roc-graph-layout · cold
1.8 s · 57,088 lines
(median across five runs)
lukewilliamboswell/roc-blueprint · import changed
1.744 s · 14,460 lines
(median across five runs)
grayrest/roc-markdown · cold
1.621 s · 8,649 lines
(median across five runs)
lukewilliamboswell/roc-font · cold
1.621 s · 19,995 lines
(median across five runs)
grayrest/roc-markdown · import changed
1.608 s · 8,649 lines
(median across five runs)
grayrest/roc-markdown · root changed
1.567 s · 8,649 lines
(median across five runs)
lukewilliamboswell/roc-graph-layout · import changed
700 ms · 57,088 lines
(median across five runs)
roxum/ddd · cold
700 ms · 11,896 lines
(median across three runs)
roxum/middleware · cold
650 ms · 10,501 lines
(median across three runs)
roxum/hello · cold
620 ms · 10,159 lines
(median across three runs)
lukewilliamboswell/roc-time · cold
580 ms · 19,374 lines
(median across five runs)
lukewilliamboswell/weaver · cold
457 ms · 7,190 lines
(median across five runs)
lukewilliamboswell/roc-ray · cold
432 ms · 18,856 lines
(median across five runs)
showell/roc-markdown · cold
366 ms · 6,241 lines
(median across five runs)
grayrest/roc-regex · cold
261 ms · 9,076 lines
(median across five runs)
lukewilliamboswell/roc-font · import changed
198 ms · 19,995 lines
(median across five runs)
grayrest/roc-regex · import changed
147 ms · 9,076 lines
(median across five runs)
lukewilliamboswell/plume · cold
132 ms · 3,838 lines
(median across five runs)
showell/roc-apps · cold
115 ms · 2,869 lines
(median across five runs)
lukewilliamboswell/roc-time · import changed
110 ms · 19,374 lines
(median across five runs)
showell/roc-markdown · import changed
83.7 ms · 6,241 lines
(median across five runs)
lukewilliamboswell/weaver · import changed
65.6 ms · 7,190 lines
(median across five runs)
rocco/widgets · cold
65 ms · 3,740 lines
(median across three runs)
lukewilliamboswell/plume · import changed
56 ms · 3,838 lines
(median across five runs)
rocco/pong · cold
56 ms · 3,583 lines
(median across three runs)
showell/roc-apps · import changed
51.7 ms · 2,869 lines
(median across five runs)
rocco/primitives · cold
42 ms · 2,134 lines
(median across three runs)
lukewilliamboswell/roc-ray · root changed
41.2 ms · 18,856 lines
(median across five runs)
lyceum-quest/study · cold
27.6 ms · 348 lines
(median across five runs)
showell/roc-apps · root changed
26 ms · 2,869 lines
(median across five runs)
lukewilliamboswell/roc-graph-layout · root changed
22.6 ms · 57,088 lines
(median across five runs)
lukewilliamboswell/roc-graph-layout · warm
19.3 ms · 57,088 lines
(median across five runs)
lukewilliamboswell/roc-platform-template-zig · cold
14.9 ms · 139 lines
(median across five runs)
ageron/roclet-display · import changed
14.4 ms · 101 lines
(median across five runs)
ageron/roclet-display · cold
14.3 ms · 101 lines
(median across five runs)
lukewilliamboswell/roc-time · root changed
13.7 ms · 19,374 lines
(median across five runs)
lukewilliamboswell/roc-time · warm
13 ms · 19,374 lines
(median across five runs)
lukewilliamboswell/roc-font · root changed
12.9 ms · 19,995 lines
(median across five runs)
lukewilliamboswell/roc-platform-template-zig · root changed
12.2 ms · 139 lines
(median across five runs)
lukewilliamboswell/roc-font · warm
11.1 ms · 19,995 lines
(median across five runs)
lukewilliamboswell/roc-ray · warm
10.9 ms · 18,856 lines
(median across five runs)
ageron/roclet · root changed
10 ms · 29 lines
(median across five runs)
ageron/roclet · cold
9.3 ms · 29 lines
(median across five runs)
lukewilliamboswell/roc-blueprint · root changed
9.1 ms · 14,460 lines
(median across five runs)
showell/roc-markdown · root changed
8 ms · 6,241 lines
(median across five runs)
lukewilliamboswell/roc-blueprint · warm
7.8 ms · 14,460 lines
(median across five runs)
showell/roc-markdown · warm
7 ms · 6,241 lines
(median across five runs)
lukewilliamboswell/weaver · root changed
7 ms · 7,190 lines
(median across five runs)
grayrest/roc-regex · root changed
6.9 ms · 9,076 lines
(median across five runs)
lukewilliamboswell/plume · root changed
6.8 ms · 3,838 lines
(median across five runs)
showell/roc-apps · warm
6.5 ms · 2,869 lines
(median across five runs)
lukewilliamboswell/weaver · warm
6.2 ms · 7,190 lines
(median across five runs)
grayrest/roc-regex · warm
6.2 ms · 9,076 lines
(median across five runs)
grayrest/roc-markdown · warm
6 ms · 8,649 lines
(median across five runs)
lukewilliamboswell/plume · warm
5.7 ms · 3,838 lines
(median across five runs)
ageron/roclet-display · root changed
4.8 ms · 101 lines
(median across five runs)
lyceum-quest/study · root changed
4.8 ms · 348 lines
(median across five runs)
lukewilliamboswell/roc-platform-template-zig · warm
4.4 ms · 139 lines
(median across five runs)
ageron/roclet-display · warm
4.1 ms · 101 lines
(median across five runs)
ageron/roclet · warm
3.9 ms · 29 lines
(median across five runs)
lyceum-quest/study · warm
3.9 ms · 348 lines
(median across five runs)
I left one outlier out of these charts because it made the y-axes hard to read: Rocco's village example. Its cold-run median build times on an M5 MacBook Pro were 1s for roc check, 3.5s for roc build --opt=dev, and 7.5s for roc test. The example wasn't significantly bigger than the other code bases, but it contained a huge literal which revealed a pathological edge case in the compiler. A fix for that edge case should be in the next release after 0.1.0.
Roc is designed to have user-friendly syntax, APIs, and compiler error messages.
Syntax Example
Here's what Roc code looks like, adapted from a sparkline rendering example in Kite, a Roc GUI platform whose author runs it on an e-ink tablet. (You can read more about Kite in its community showcase entry below.)
spark_cell = |ctx| {
prices = ctx.row.timeline
up = match (prices.first(), prices.last()) {
(Ok(first), Ok(last)) => first < last
(_, _) => True
}
color = if up { Colors.good } else { Colors.bad }
Sparkline.bars(prices, 100.0, 28.0, color)
|> View.style(St.width(Grow).height(Fixed(28)))
}
Error Messages
Here's the error message you get if you change True to 1 in this example:
✗ type mismatchmain.roc:11:13
This number is being used where a non-number type is needed.
(_, _) => 1
^
Other code expects this to have the type:
Bool
Roc is directly descended from Elm, whose compiler is legendary for its friendly error messages, and Roc's goal is to follow in its footsteps.
Purity Inference
A concise example of Roc's user-friendliness is this snippet:
if File.exists!(path)
Just by looking at this code, I can tell you that File.exists! is not a pure function; it performs side effects. That's because Roc's type system gives different types to pure functions and effectful functions, and the compiler enforces the naming convention that effectful functions' names must end in !.
I can also tell that this conditional is inside an effectful function. That's because effectful functions may only be called from other effectful functions (pure functions can be called anywhere), which the compiler infers and enforces. This simple system reliably tells you which parts of your code base are pure (usually most, in real-world Roc code bases), and exactly where the effects are, while keeping function calls as straightforward as they are in mainstream languages.
Compile-Time Evaluation
Pure functions are also evaluated at compile time when possible (that is, when they depend on no runtime inputs), and this happens before exhaustiveness checking. That means this roc-regex snippet will execute Regex.compile when you are compiling your Roc program:
Ok(my_regex) = Regex.compile(".*Holmes.*&.*Watson.*")
If your regex string contains a syntax error, Regex.compile will return an Err during compile-time evaluation, making the Ok pattern-match fail before your program even runs. Even roc check will report an error for this! These functions are safe to evaluate at compile time because the compiler knows they're pure.
Friendly People
The Roc community is also full of friendly people who hang out in Roc Zulip. Come say hi in the #introductions channel!
When I asked for community projects to share in the 0.1.0 announcement post, I got way too many responses to put here, so I left some out and limited these to one project per author. Below each featured project, you can find links to other projects that community member has made.
Roc is designed to be useful in a variety of use cases, and these projects demonstrate a wide range of them: a full-stack Web framework, native macOS and Windows app frameworks based on reactive signals, a 3D game engine, a reactive notebook, a neural-network library, a native GUI platform running apps on an e-ink tablet, a chat client, a Game Boy Advance emulator, commercial screenwriting software, an immediate-mode UI library, a Web framework for hypermedia apps, a bindings generator for Godot and related game engines, a CLI for reproducible development environments and machines, a Redis client, an HTTP API and backend server platform, and a serialization format.
An open-source framework for building full-stack web applications in Roc, with an Elm-style architecture and a WebAssembly frontend. Niclas has been using Joy in paid production work for 2 years.
Niclas has also published numerous other open-source Roc packages, most of which he uses in production.
Platforms for building native macOS and Windows applications in Roc, using pure functions for rendering and reactive signals for state updates without side effects.
Luke uses Roc for internal tooling at work, and has open-sourced many different packages and platforms.
An experimental 3D game engine for native desktop or WebAssembly games, with game logic written in Roc and engine internals written in Odin. It has a stylish interactive tour that you can try in your browser.
Download the Rocco demo video.
Reactive Roc notebooks that run in a browser (including offline!) with support for exporting notebooks and running the server locally.
Download the Roclet introduction.
Aurélien's introduction to Roclet. Shared on Zulip.
Aurélien has also written lots of Roc's official documentation and tutorial, and also created the Roc Exercism Track. He's also published a variety of other Roc packages.
A small neural network package for exploring machine learning, inspired by micrograd and tinygrad. You can try it in your browser via Roclet.
A native GUI platform using The Elm Architecture, Tailwind-inspired styles, animation, and rich text. Karl runs it on an e-ink tablet:
Karl has open-sourced other Roc packages as well.
A privately-deployed chat application featuring topics, direct messages, and Markdown for styling. roc-chat uses Roc for its application logic and a custom platform under the hood written in Zig.
Steve has also built games, learning materials, and packages in Roc.
A work-in-progress Game Boy Advance emulator written in Roc. It uses Luke Boswell's roc-ray for graphics, and has not implemented sound yet.
Commercial screenwriting software that uses Roc for screenplay layout, pagination, and other application logic, with a custom Rust platform under the hood for managing I/O and collaborative document state.
An immediate-mode GUI library for Roc native applications and games, with a Clay-inspired layout system, a Model-View-Update architecture, and roc-ray rendering. You can see its interactive tutorial in action here:
A web platform with typed HTML templates, SQLite queries that are verified at compile time, server-sent events, and live reload. Its tutorial is a Roux app, and there are nightly benchmarks vs. Go, axum, and others.
Generates Roc bindings for Godot, Redot, and other game engines using GDExtension, so you can write game logic in Roc for any of these engines.
Scott has also built other platforms and developer tools in Roc.
As the README explains: "Kai wraps Nix in a friendly frontend"—with an optional guix plugin as well.
Brandon has also built Ancient Greek learning tools in Roc.
A binary-safe Redis client that can be used from different Roc platforms. Jared isn't aware of anyone using it in the wild yet.
#### Redis client throughput (higher is better)
roc-redisgo-redisredis-pyredis-rs
Throughput vs. redis-rs
0%
10%
20%
30%
40%
50%
60%
70%
80%
90%
100%
ping_sequential
set_get_sequential
incr_sequential
ping_pipeline
mset_mget_sequential
hash_roundtrip_sequential
set_get_pipeline
roc-redis on ping_sequential
91.8% of redis-rs throughput
go-redis on ping_sequential
76.0% of redis-rs throughput
redis-py on ping_sequential
29.7% of redis-rs throughput
roc-redis on set_get_sequential
93.5% of redis-rs throughput
go-redis on set_get_sequential
79.2% of redis-rs throughput
redis-py on set_get_sequential
29.8% of redis-rs throughput
roc-redis on incr_sequential
92.6% of redis-rs throughput
go-redis on incr_sequential
78.7% of redis-rs throughput
redis-py on incr_sequential
32.1% of redis-rs throughput
roc-redis on ping_pipeline
96.3% of redis-rs throughput
go-redis on ping_pipeline
91.8% of redis-rs throughput
redis-py on ping_pipeline
10.0% of redis-rs throughput
roc-redis on mset_mget_sequential
92.7% of redis-rs throughput
go-redis on mset_mget_sequential
81.4% of redis-rs throughput
redis-py on mset_mget_sequential
29.8% of redis-rs throughput
roc-redis on hash_roundtrip_sequential
94.4% of redis-rs throughput
go-redis on hash_roundtrip_sequential
80.5% of redis-rs throughput
redis-py on hash_roundtrip_sequential
29.7% of redis-rs throughput
roc-redis on set_get_pipeline
91.2% of redis-rs throughput
go-redis on set_get_pipeline
95.8% of redis-rs throughput
redis-py on set_get_pipeline
11.3% of redis-rs throughput
A webserver platform with typed handlers, tags, and staged middleware. Here's how Roxum benchmarks against Rust's axum crate:
#### HTTP throughput with Roxum
roxumaxum
Throughput vs. axum
0%
20%
40%
60%
80%
100%
120%
Plaintext
Pre-encoded JSON
Routing (100 routes)
Keep-alive-heavy
1,000 connections
Roxum on plaintext
216,198 req/s (82% of axum)
(median across four runs)
Roxum on pre-encoded json
218,086 req/s (83% of axum)
(median across four runs)
Roxum on routing (100 routes)
187,479 req/s (73% of axum)
(median across four runs)
Roxum on keep-alive-heavy
172,320 req/s (96% of axum)
(median across four runs)
Roxum on 1,000 connections
200,752 req/s (76% of axum)
(median across four runs)
Pronounced "raven," short for Roc Value Notation. As the README says:
Raven is to Roc as JSON is to JavaScript. Any Roc value that does not contain functions is valid Raven.
{
language: "Roc",
tags: [Fast, Friendly, Functional],
color: 0x7c38f5, # Hex numbers and comments, too!
}
Jasper also created Gregorian, "a small and safe date/time package."
Other Packages
You can find many more Roc projects at roc-awesome, or right here in this list:
More packages from community members
Niclas Åhdén
- joy-html provides HTML building blocks for Joy applications.
- roc-pg is a PostgreSQL client with compile-time checking of SQL queries.
- roc-deflate implements DEFLATE compression in pure Roc.
- roc-xlsx generates Excel spreadsheets.
- roc-zip creates and extracts ZIP archives.
- roc-playwright lets Roc programs automate browsers using Playwright.
- roc-spec runs tests in parallel with isolated test environments.
- roc-vcr records and replays HTTP interactions for tests.
- roc-openapi validates HTTP request bodies against OpenAPI specifications.
- roc-sendgrid sends email through SendGrid.
- roc-url parses and constructs URLs.
- roc-database-url parses database connection URLs.
- roc-base64 encodes and decodes Base64.
- roc-crc32 calculates CRC32 checksums.
- roc-hmac implements HMAC authentication codes in pure Roc.
- roc-md5 implements MD5 hashing in pure Roc.
- roc-scram implements SCRAM authentication in pure Roc.
- roc-prng provides pseudorandom number generation.
- roc-xml generates XML.
- roc-human-readable-file-size formats file sizes for people to read.
- roc-maybe provides a type for optional values.
- roc-non-zero provides a number type that excludes zero.
Luke Boswell
- roc-ray is a platform for games and graphics built on raylib, with support for tasks, networking, files, and databases.
- roc-gui is an experimental platform for native GUI applications using GPUI.
- roc-signals is a signals-based framework for web user interfaces.
- plume provides a typed Roc API for interactive Plotly.js charts.
- roc-docx reads and writes Word documents compatible with Word, LibreOffice, and Google Docs.
- roc-font reads OpenType and TrueType fonts and shapes text into positioned glyphs.
- roc-graph-layout provides graph layout algorithms and parses and renders Mermaid diagrams.
- roc-parser combines parser combinators with ready-made parsers for formats including JSON, YAML, XML, Markdown, AsciiDoc, HTTP, and Roc source.
- roc-pdf generates PDF 2.0 and PDF/A-4 documents in Roc.
- roc-time handles dates, times, and durations.
- weaver parses command-line arguments with an API inspired by Rust's clap.
- basic-ssg generates static sites from Markdown and AsciiDoc.
- roc-fuzz provides fuzzing and property-based testing using libFuzzer, along with tools for observing performance.
- Zig platform template is a starting point for hosting Roc applications in Zig.
- Rust platform template is a starting point for hosting Roc applications in Rust.
- Go platform template is a starting point for hosting Roc applications in Go.
- embed-roc-in-dotnet demonstrates embedding Roc in a .NET application.
- roc-blueprint describes development environments, builds, tasks, and workflows in Roc, with Nix integration.
- roc-automation supplies shared automation and a manual for maintaining Roc packages and platforms.
- roc-awesome collects maintained Roc packages, platforms, tools, and applications from across the community.
Karl
- Trantor assembles Roc platforms from reusable Rust components.
- roc-regex is a regular expression engine written in Roc.
- roc-markdown is Karl's CommonMark and GitHub Flavored Markdown parser, a separate project from Steve's library of the same name.
Steve Howell
- Safari Walk is a 3D journey through a savanna at sunset, built with Roc and Rocco and running in browsers with WebGPU support.
- A little Roc book teaches Roc by walking through the code behind the original 2D Safari Ride.
- roc-markdown is Steve's Markdown library, used in his book-building tools and chat application.
- BASIC interpreter is a browser playground for running BASIC programs with an interpreter written in Roc.
- Fast Track is a browser implementation of the marble-racing board game, with card-driven moves and computer opponents.
- Welcome to Roc is an animated welcome made for the Roc release.
blu
- Lyceum Study is a spaced-repetition tool for learning Ancient Greek, being ported to Roc.
- Apo uses language models to generate glosses and prose translations as part of the Lyceum Ancient Greek toolkit.
Aurélien Geron
- roclet-display adds rich notebook output such as tables, images, charts, and interactive controls.
- Exercism's Roc track provides coding exercises, tests, and example solutions for learning and practicing Roc.
Jasper Woudenberg
- Gregorian provides tools for working with dates and times.
Scott Campbell
- goose-roc experiments with hosting Roc applications in Goose, including a console example and a work-in-progress mini-Doom port.
- roc-build runs build tasks in parallel according to their dependency graph, using a Zig host.
- roc-platform-patcher injects middleware into already-distributed platforms, enabling instrumentation, effect interception, and testing even when a platform's source is unavailable.
More about the language
Beyond the basics discussed earlier, here are some more details about Roc as a language. This won't be as comprehensive as the language reference or as helpful an introduction to the language as the tutorial or Exercism learning track, but it will give you an overview of what you can find in it.
Common Features
These are some features Roc has that can be found in several other languages.
- Cross-compiling to static binaries out-the-box just like Go, including to Linux with no libc dependency (e.g. for Alpine Linux).
- Sum types with pattern matching and exhaustiveness checks.
- You don't have to declare them up front; they can be anonymous and structural. Same with records.
- Simple, sound type system.
- No
nullorany(or equivalent of either). - Type annotations are optional. Roc's type inference is principal and decidable, meaning it always correctly infers the most flexible correct type.
- No
- All expressions that can be evaluated at compile time are evaluated then.
- This is true even if heap allocations are involved.
- Testing, building, package management, and formatting, are all out-the-box.
- Tests are automatically cached to avoid re-running tests whose outcomes couldn't possibly have changed given that the relevant source code didn't.
Uncommon Features
These are features that are much less common.
- All values are semantically immutable, but Roc's optimizer does opportunistic mutation behind the scenes to speed up common situations where mutating would not be observable.
- Zero-allocation lambdas (heap allocation, that is)
- Binary algebraic effects (pure functions vs. effectful functions)
- Platforms and applications
- Shared build and test cache out-the-box
- Inferred parsers and encoders
Getting Started
If Roc sounds interesting to you, the official tutorial is an easy place to start, and the language reference can answer questions you encounter in more detail.
In addition to writing much of the official documentation, Aurélien Geron created Exercism's Roc track and has built out 139 different exercises in conjunction with other maintainers.
Finally, Roc Zulip has always been a welcoming place for beginners, and there are plenty of friendly people there who are happy to help you get into the language. Come say hi in the #introductions channel!
Shout-Outs
Before wrapping up, I want to give some final shout-outs to all the people and projects who got Roc to this milestone, including:
- The amazing Roc community! This post would have practically no content without the people who created the wonderful projects above.
- All the contributors, past and present, who helped bring the language to this milestone. Thank you, thank you, thank you!
- The Elm Programming Language, which directly inspired Roc (fun fact: the logo is origami as an homage to Elm's tangram logo).
- The Koka and Morphic research languages, without which Roc would not be competitive with fast imperative languages on performance.
- The Rust Programming Language, which is the language Roc's original compiler was written in. It served us well for years, and I'm still happy to use it daily at work.
- The Zig Programming Language, which is the language Roc's compiler is now written in. It has continued to be great for us since the rewrite, and I'm still a happy recurring donor to the nonprofit Zig Software Foundation.
- Zed, the editor I used for the entirety of the current code base, at least until I switched to...
- Delta, which has become my main tool for building software. It's what I use daily to collaborate with my coworkers, as well as some Roc contributors.
- And finally, all the people and companies who have donated to the nonprofit Roc Programming Language Foundation. Your donations, whether through every.org, Liberapay, GitHub Sponsors, or Benevity, have let us pay contributors to improve the language, and we'd love to do more of that! Corporate sponsors are also welcome; DM me on Zulip if you'd like to chat about corporate sponsorship.
What's Next?
The next release after 0.1.0 will most likely be 0.1.1, with bugfixes and performance improvements based on issues people have already reported on 0.1.0. (It will not take eight years to ship. Most likely sometime in December 2026.) In the meantime, there are automatically-published nightly releases if you want to try the latest compiler built from the previous day's main.
After that, here are some things we're exploring for 2027 and beyond:
- Concurrency primitives in the standard library
- Improved test output, as well as support for simulating effects (and testing real effects) and property-based testing out-the-box
- A built-in debugger (in addition to the DWARF debug info we already emit for third-party debuggers to use)
- Features inspired by theorem provers for additional ways to verify Roc programs
- Improving build times for cold builds and optimized builds. (Minimizing development rebuild times was the priority for 0.1.0, since that's the most common feedback loop.)
It's taken a long time to get this foundation in place, but 0.1.0 is just the beginning for Roc!







