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.
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!)
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.
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:
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.)
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.)
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.
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.
A concise example of Roc's user-friendliness is this snippet:
ifFile.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.
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:
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.
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.
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.
Platforms for building native macOS and Windows applications in Roc, using pure functions for rendering and reactive signals for state updates without side effects.
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.
Reactive Roc notebooks that run in a browser (including offline!) with support for exporting notebooks and running the server locally.
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.
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:
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.
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.
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)
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!
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 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!