Skip to content
SoftwareAnalysis

Roc 0.1.0: eight years in, a functional language that runs nearly as fast as Rust

After eight years and a full compiler rewrite, the Roc programming language has its first numbered release, with runtime speed close to Rust and C and build times measured in milliseconds.

A great bird built from flat geometric shapes on a deep teal ground, its neck an arc of pale half-discs, its wings fanning out in cream and sand, with a single amber disc sun in the upper right
A great bird built from flat geometric shapes, the roc the language is named for, on a deep teal ground with a single amber sun.
On this page

In brief

  • Roc 0.1.0 was announced November 30, 2026, eight years after design began in 2018 and a year after a full compiler rewrite.
  • Community benchmarks put Roc within a few percent of C on compression and at 91 to 96 percent of Rust's Redis client throughput.
  • Cold type-checks run under a second on a 66,000-line codebase; warm rebuilds take as little as a few milliseconds.
  • The language marks effectful functions with `!` and evaluates pure functions at compile time, before the program runs.
  • Version 0.1 is not 1.0: concurrency primitives and a built-in debugger are on the 2027 roadmap, with 0.1.1 expected in December.

Eight years after Richard Feldman started designing it, the Roc programming language has its first numbered release. Version 0.1.0, announced November 30, is the moment a long-running language experiment becomes something you can download, with the author's own numbers to judge it by: community projects that run within a few percent of C and Rust, and build times measured in milliseconds.

Roc's tagline is fast, friendly, functional, and the release is built to be judged on the first word. Feldman set out in 2018 to build an Elm-inspired language for the long tail of use cases Elm did not cover. Eight years later, the language compiles to standalone binaries or WebAssembly, with hot reloading out of the box, and the announcement reached the Hacker News front page on the morning of November 30. The question the release answers is whether a functional language with automatic memory management can run close enough to Rust and C to matter, and whether its builds can stay fast enough that the question is worth asking.

Eight years, one rewrite

The timeline in the announcement is unusually candid about how long the road was. Feldman started designing Roc in 2018 and made the first compiler commit in 2019. He talked about the project publicly in 2020 and spoke about it at Strange Loop in 2021. The design drew on research from the Koka and Morphic languages, but the team hit a major architectural problem along the way, one Feldman discussed in detail with contributor Ayaz Hafiz in 2024.

That problem led to a scratch rewrite of the compiler in 2025, completed earlier in 2026. The compiler is now written in Zig. The original was written in Rust, a language Feldman says he still uses daily at work. The rewrite is the reason the release took eight years, and it is also the reason Feldman held off on a numbered release until now: he wanted to avoid implying stability before the design had settled. The types in the standard library still look about how they did in his 2018 sketches, which is his way of saying the design survived the rewrite even when the implementation did not.

The numbers Feldman leads with

Roc's stated goal is to approach the speed of Rust and C++ without matching it, since automatic memory management and stricter memory safety both cost runtime. The announcement makes its case with four community projects, each measured against a Rust or C counterpart at the highest optimization levels.

The sharpest comparison is a compression library. In an October post, Feldman compared roc-deflate, written in pure Roc, against libdeflate, the C library, across 144 compression benchmarks. The median slowdown was 2.6 percent on an M1 MacBook Pro and 8.9 percent on a Ryzen 3900X machine. On the worst inputs roc-deflate ran 18 percent slower; on the best inputs it ran slightly over 18 percent faster. That result came after heavy optimization work, and Feldman says plainly that we will not know how well it generalizes until a wider sample of real Roc code is optimized. The comparison also covers only the non-streaming APIs, since roc-deflate has not implemented streaming yet.

The Redis client tells a similar story. Roc-redis ran at 91.2 to 96.3 percent of the throughput of redis-rs, the Rust client, across seven operations. Go's client ran at 76 to 96 percent on the same operations, and the Python client at about 10 to 32 percent.

Throughput of roc-redis as a share of redis-rs across seven operations, from 91.2 percent on set and get pipeline to 96.3 percent on ping pipeline
Roc-redis runs at 91 to 96 percent of the Rust client's throughput on every operation measured. Figures from the benchmarks in the roc-redis README, as plotted in the Roc 0.1.0 announcement. Source.

A regex engine written in Roc ran faster than Rust's popular regex crate on every pattern Feldman listed, taking 37 to 98 percent of the crate's time. Feldman flags the comparison himself: it is not apples to apples, since the Roc engine uses the RE# matching algorithm, which differs from how the Rust crate is implemented. And roux, a Roc web framework running on a Zig server, matched Rust's axum framework on an echo test, ran at 99 percent on connection churn, and beat it on server-sent events, plaintext, and templates, reaching 153 percent of axum's plaintext throughput. Go's server ran at 30 percent of axum on plaintext and 5 percent on templates.

All four sets of numbers come from community projects, run on the authors' own machines and plotted by Feldman himself. They are the project's own showcase, and the article reads them as one. What they show, taken together, is that a functional language with automatic memory management can sit within single-digit percentages of C and Rust on real work, which is a result Feldman says he did not know was achievable when he started.

Builds measured in milliseconds

Roc is designed to run fast, but the announcement spends just as much space on how fast it compiles. Feldman asked the community for projects to measure, and the results are the kind of numbers that change how a language feels to use.

A type check of the largest project measured, roc-graph-layout at 66,168 lines of code including dependencies, took 874 milliseconds cold, with no cache on disk. A warm rebuild of the same project took 20.8 milliseconds. A development build of that project took 985 milliseconds cold. The slowest test run in the set took 2.242 seconds cold. Small projects check in under 10 milliseconds warm.

Feldman left one outlier out of the charts because it made the axes hard to read, and said why. Rocco's village example took 1 second to check, 3.5 seconds to build, and 7.5 seconds to test cold on an M5 MacBook Pro. The project was not much bigger than the others, but it contained a huge literal that exposed a pathological edge case in the compiler. A fix is planned for the next release. The outlier matters because it is the one place the announcement shows its work: the numbers are good, and the one bad number is named rather than hidden.

What Roc actually is

The speed numbers are the hook, but the language itself is the argument. Roc is directly descended from Elm, whose compiler is known for friendly error messages, and Roc aims to follow it. Change a True to a 1 in the announcement's example and the compiler answers in plain English: the number is being used where a non-number type is needed, with a pointer at the exact line.

The idea that carries the most weight is the exclamation mark. Roc's type system gives different types to pure functions and effectful functions, and the compiler enforces the naming convention that effectful functions end in !. Reading File.exists!(path) tells you at a glance that the call has side effects, and that the code around it is inside an effectful function, since effectful functions may only be called from other effectful functions. Pure functions can be called anywhere, and the split shows exactly where the effects are in a codebase.

Pure functions also run at compile time when they depend on no runtime inputs. A regex compiled with Regex.compile runs while the program is being built, so a bad pattern fails the build before the program runs, and even roc check reports it. That is the same mechanism that lets the compiler evaluate lookup tables at compile time and skip runtime bounds checks it can prove unnecessary.

The third load-bearing idea is platforms. A Roc application runs on a platform written in a lower-level language, which handles input, output, and the operating system, so Roc programs never call out through a foreign-function interface that would compromise the language's guarantees. Templates exist for hosting Roc applications in Zig, Rust, and Go, and one community project demonstrates embedding Roc in a .NET application. The same design is why Roc packages carry no build scripts and no arbitrary foreign-function interface, which limits what a compromised package can do: its pure functions can only return a wrong value, crash, or waste resources.

The rest of the language follows from those choices. There is no null and no any. Type annotations are optional, and the inference is principal and decidable, meaning it always finds the most flexible correct type. Sum types, values that are one of a fixed set of options, come with pattern matching and exhaustiveness checks. Values are semantically immutable, but the optimizer mutates them behind the scenes when it can prove the mutation is unobservable. Lambdas allocate nothing on the heap. Roc cross-compiles to static binaries, including Linux binaries with no libc dependency, and it ships testing, building, package management, and formatting out of the box.

That is a third answer to a trade-off we covered in November, when we compared Rust and Go for command-line tools on build speed, binary size, and error handling. Roc's answer is a functional language whose compiler checks effects as well as types, and whose build times make the argument cheap to have.

What people have already built with it

The announcement's longest section is a showcase, and it reads as evidence that the language is already being used for real work. Joy, a full-stack web framework, has been in paid production for two years. Luke Boswell's platforms build native macOS and Windows applications. Rocco is a 3D game engine with an interactive tour you can try in a browser. Roclet is a reactive notebook that runs in a browser, including offline. Kite is a native GUI platform its author runs on an e-ink tablet. There is a Game Boy Advance emulator with no sound yet, commercial screenwriting software, bindings for the Godot and Redot game engines, and Kai, a friendly frontend for Nix.

The package list behind the showcase is just as long: a Redis client, a PostgreSQL client with compile-time checking of SQL queries, a Markdown parser, a PDF generator, a font reader, a date and time library, and a serialization format called Raven, which its author describes as to Roc what JSON is to JavaScript. The Exercism learning track has 139 exercises. None of this proves a language will succeed, but it does show that eight years of development produced an ecosystem as well as a compiler.

What 0.1.0 is not

Feldman is explicit that 0.1 is not 1.0. The version number is the point: after eight years, the design has settled enough to number, and the next release, 0.1.1, is expected in December 2026 with bug fixes and performance improvements. Nightly releases continue for anyone who wants the latest compiler built from the previous day's work.

What is missing is also listed, and it is substantial. Concurrency primitives in the standard library, a built-in debugger, effect simulation and property-based testing out of the box, and features inspired by theorem provers are all on the list for 2027 and beyond, along with better cold build times and optimized build times. The debugger already has DWARF debug info, the standard format third-party debuggers read, emitted for those debuggers to use, but there is no built-in one yet.

The honest limit is the one Feldman states himself about the compression result: a single heavily optimized package does not show how close Roc can get to C in the general case. The benchmarks are the project's own showcase, run by the project's own people, and the ecosystem is still small. The real test of 0.1.0 is whether anyone beyond the enthusiast core builds with it.

Trying it, and what comes next

The release is up now, with binaries for Linux and macOS and the source on GitHub. The official tutorial and language reference are on roc-lang.org, the Exercism track has 139 exercises, and the community gathers on Zulip. Version 0.1.1 is expected in December. The eight years bought a settled design and a compiler fast enough that the feedback loop is measured in milliseconds. The question now is whether the language finds users beyond the community that built it.

Related reporting

More from grep.tips

All articles