Moving to Roc 0.1.0 RC1

Seven projects, about 144,000 lines of Roc, all checks green at RC1.

Each project's previous pin, nightly-2026-11-03-34bd006, against RC1:

projectlines of Rocdev build after an edit, CPU scold check, CPU sRC1 checks
roc-apps78,1435.24 → 0.61 (8.6× faster)6.83 → 4.55 (1.5× faster)green: 51 apps, Safari's and four other gates
roc-chat45,2788.48 → 1.42 (6.0× faster)7.71 → 8.08 (about the same)green: 29 checks, the end to end and cost check among them
roc-screensaver8,9041.28 → 0.15 (8.5× faster)1.74 → 1.83 (about the same)green: 34 checks, frames pixel-identical
roc-markdown6,4130.52 → 0.07 (7.4× faster)0.56 → 1.33 (2.4× slower)green: its gates
roc-syntax-color5,3291.06 → 0.05 (21.2× faster)0.55 → 1.34 (2.4× slower)green: its gates
roc-types76a Zig program; its Roc is test fixturesrebuilt, tested, published
roc-ast7a Zig program; its Roc is test fixturesrebuilt, tested, published

Median CPU seconds of three runs, old nightly → RC1.

A report for the Roc team on 0.1.0_RC1. Claude, an AI coding agent, made the moves, ran the measurements and wrote this page under Steve's supervision.

Summary

Possible issues for the Roc team

"Green" in roc-apps: roc check of 51 apps, Safari's gate (974 expects, 20 widgets and 1089 of their tests, the page's drawing at its frozen checksum), the chess, Dog Park, Seattle Delivery and book_builder gates; in roc-screensaver, its 34 checks, Windows cross-builds included.

Things we simply had to fix in our own code

What moving cost us

Much of this was our own code being wrong: parameters hiding their function (our Safari book taught metres = |metres|) and a plain record standing in for a nominal type.

By repository

repositorywhat the move tookcommits
roc-apps31 renames, the nominal Cat and Bird, 5 typed literals, the chess gate's flag, the glue, and the native builds retired. The workaround for the crash that roc#12925 fixed was already gone.6784d48, 3f7dd21, b61317a, 4b4a9d3, 862e380, a44c405, 5dca699, 74fc1f9
roc-chat48 renames, made at the old pin and checked at RC1 too (no errors; only the five warnings below). Then the five nested-member renames, exact pin checks in the build, verify and glue, the pin and the glue; its 29 checks are green.d56daed, e8e8a84, ef7b89e, c8c532c
roc-screensaver4 renames, 9 typed literals and the glue. Its rendered frames are pixel-identical: the PNG harness's checksums didn't change.29774b1, a14102b, 0940319
roc-markdownThe pin only; its gates are green.f3bc41a
roc-syntax-colorThe pin only; its gates are green.5ba4459
roc-typesRebuilt against 15177e9 and published as roc-types-1-0.1.0_RC1, passing the new specialization strategy and stripping its release build.6d522d3, 8e7a5e7, ec68d81, 879e1f8
roc-astRebuilt against 15177e9 and published as roc-ast-flat1-0.1.0_RC1.6ef6c45, 0d054a2

Dev builds default to boxy lowering

roc build --help: "Use lambda-set specialization (yes, the --opt=speed default) or boxy lowering (no, the default otherwise)". Safari's dev-built proof tools took 56 s either way; KnightProof's search (CPU s, one run):

buildold nightly (2026-11-03)RC1
--opt=dev15.60 s344.73 s
--opt=dev --specialize=yesn/a15.82 s
--opt=speed0.92 s0.33 s

With the flag the chess gate went from 593 s to 24.7 s. Our workaround:

roc-apps canvas_apps/chess_kit/gates/run.shale, lines 44-49, at a44c405

-- `--specialize=yes` because Roc 0.1.0_RC1 lowers a dev build the boxy way
-- unless told otherwise, and KnightProof's search ran 22 times slower so: 344.7 s
-- of CPU, against 15.8 s specialized (15.6 s at nightly-2026-11-03-34bd006).
function hold_proof(roc, toy, work)
  local bin = real(work) .. "/" .. toy.proof
  local b = run({roc, "build", "--opt=dev", "--specialize=yes", toy.proof .. ".roc", "--output=" .. bin}, {cwd = toy.folder, timeout_ms = 600000, tail = 40, nice = 19, want = WANT})

"Duplicate definition" for a nested type's member

A bare width inside Lid would mean the inner one, so this may be intended. But the two are only reached qualified, and if it is intended, a message other than "duplicate definition" would help.

Crate.roc

Crate := { width : U64 }.{
	width : Crate -> U64
	width = |Crate.(crate)| crate.width

	Lid := { width : U64 }.{
		width : Crate.Lid -> U64
		width = |Crate.Lid.(lid)| lid.width
	}
}

main.roc

app [main!] {}

import Crate

main! = |_args| {
	echo!("${Crate.width(Crate.({ width: 3 })).to_str()} ${Crate.Lid.width(Crate.Lid.({ width: 4 })).to_str()}")
	Ok({})
}

roc check main.roc, at 0.1.0_RC1

── ● duplicate definition ────────────────────────────────────── ./Crate.roc:7:3

The name width is being redeclared here.

width = |Crate.Lid.(lid)| lid.width
^^^^^

In this scope, width was already defined in ./Crate.roc:3:2.

width = |Crate.(crate)| crate.width
^^^^^

── 0 errors and 1 warning ───────────────────────────────────────────── main.roc

RC1 runs it correctly (3 4); the old nightly checks it clean. roc-chat's five sites (AgentKey.Admitted.scope; signed_bytes in GitHubSignUp.Claim, GitHubState.Claim and Session.Claim; Users.Human.user) became granted_scope, bytes_to_verify and as_user, 51 call sites in one commit, e8e8a84.

The stricter nominal-type check

The old nightly let a plain record unify with a nominal type through an alias's parameter, and printed Sit:

Cat.roc

Cat := { pose : [Sit, Run] }.{
	pose_of : Cat -> [Sit, Run]
	pose_of = |c| c.pose
}

main.roc

app [main!] {}

import Cat

Wrapped(kind) : { animal : kind }

wrap : pose -> Wrapped({ pose : pose })
wrap = |pose| { animal: { pose } }

cat : [Sit, Run] -> Wrapped(Cat)
cat = |pose| wrap(pose)

main! = |args| {
	pose = if (args.len() > 1) Run else Sit
	echo!(Str.inspect(cat(pose).animal.pose_of()))
	Ok({})
}

roc check main.roc, at 0.1.0_RC1

── ✗ type mismatch ────────────────────────────────────────────── main.roc:11:14

This expression is used in an unexpected way.

cat = |pose| wrap(pose)
             ^^^^^^^^^^

It has the type:

    Wrapped({ pose: [Run, Sit] })

But the annotation says it should be:

    Wrapped(Cat)

A plain record is never the same as a nominal type like Cat, even when it has
exactly its fields.

Hint: To use Cat here, write Cat instead of the record type in the type
annotation that says it's a plain record. You can also convert between Cat and
a plain record with Cat.{ ... }: build a value of type Cat from a record's
fields, or take one apart and build a record from its fields.

── 1 error and 0 warnings ───────────────────────────────────────────── main.roc

Safari did this with Cat and Bird (both :=). The fix passes in what the pose makes:

roc-apps canvas_apps/safari/Animation.roc, lines 52-57, at 4b4a9d3

placed_instant : Animation.Instant(pose), ({ pose : pose } -> kind) -> Geometry.Placed(kind)
placed_instant = |{ pose, location }, animal_of| {
	road_point: location.road_point,
	lift: location.lift,
	kind: animal_of({ pose: pose }),
}

roc-apps canvas_apps/safari/EncounterPoses.roc, lines 52-71, trimmed, at 4b4a9d3

animal_of: |posed| Cat.(posed),
...
animal_of: |posed| Bird.(posed),

The same check finds 15 mismatches in our checkout of roc-ray's platform (a plain record for Math.Vec2 or Camera.Settings) and 6 in our native runner on it. roc-ray hasn't moved to RC1 yet, so we retired our native builds.

The shadowing warning

It now covers a type's own members. The old nightly checks this clean:

Distance.roc

Distance :: F64.{
	metres : F64 -> Distance
	metres = |metres| Distance.(metres)

	to_metres : Distance -> F64
	to_metres = |Distance.(amount)| amount
}

main.roc

app [main!] {}

import Distance

main! = |_args| {
	echo!(Distance.metres(2.0).to_metres().to_str())
	Ok({})
}

roc check main.roc, at 0.1.0_RC1

── ● duplicate definition ────────────────────────────────── ./Distance.roc:3:12

The name metres is being redeclared here.

metres = |metres| Distance.(metres)
          ^^^^^^

In this scope, metres was already defined in ./Distance.roc:3:2.

metres = |metres| Distance.(metres)
^^^^^^

── 0 errors and 1 warning ───────────────────────────────────────────── main.roc

83 in our code, mostly a getter's name reused for its constructor's parameter. Safari's book example, before and after:

roc-apps canvas_apps/safari/Distance.roc, lines 8-9, at 6784d48

metres : F64 -> Distance
metres = |metres| Distance.(metres)

roc-apps canvas_apps/safari/Distance.roc, lines 8-9, at b61317a

metres : F64 -> Distance
metres = |amount| Distance.(amount)

Unsuffixed literals and method calls

The old nightly checks this clean and prints 0:

main.roc

app [main!] {}

main! = |_args| {
	echo!((0.0).to_bits().to_str())
	Ok({})
}

roc check main.roc, at 0.1.0_RC1

── ✗ missing method ─────────────────────────────────────────────── main.roc:4:9

This number's type never resolved to a concrete type, so it has no to_bits
method.

echo!((0.0).to_bits().to_str())
       ^^^

Its type needs all of these:

    a where [a.to_bits : a -> b, b.to_str : b -> Str]

Giving the number a suffix, using it somewhere that requires a specific type,
or annotating it will give it one.

── 1 error and 0 warnings ───────────────────────────────────────────── main.roc

A suffix fixes it, on both compilers. So did var $n = 0.U64 where only a later $n.max(...) typed it:

roc-screensaver screensavers/lanterns/JetFlyBy.roc, lines 325-326, at a14102b

width = xs.fold(-1.0e9.F64, |a, x| a.max(x)) - xs.fold(1.0e9.F64, |a, x| a.min(x))
height = ys.fold(-1.0e9.F64, |a, y| a.max(y)) - ys.fold(1.0e9.F64, |a, y| a.min(y))

Glue changes

Two new payload fields:

roc-screensaver host/glue/platform_abi.zig, lines 81-86, at 0940319

pub const RocErasedCallablePayload = extern struct {
    callable_fn_ptr: RocErasedCallableFn,
    on_drop: ?RocErasedCallableOnDrop,
    on_copy: ?*const fn (?[*]u8, isize) callconv(.c) void = null,
    capture_size: usize = 0,
};

Two new list types:

roc-screensaver host/glue/platform_abi.zig, lines 573-606, trimmed, at 0940319

pub const RocOpaqueList = extern struct {
    elements_ptr: ?*anyopaque,
    length: usize,
    capacity_or_alloc_ptr: usize,
...
pub fn RocHeldList(comptime T: type) type {
    return extern struct {
        elements_ptr: ?[*]T,
        length: usize,
        capacity_or_alloc_ptr: usize,

No hand-written host code of ours uses them; regenerating was enough, and book_builder's, roc-chat's and roc-screensaver's seam checks pass. roc-types passes .boxy to BuildEnv.init's new seventh parameter; it lowers nothing.

Build times

Five repositories, both compilers, under the announcement's four conditions: cold (cache emptied, then a hello-world built), warm (again at once), root changed and import changed (a comment appended to the root, or to the most-imported module). Median of three, seconds; the compilers alternated, each run niced with its own cache. The script; the TSV, with every run and the box's load.

Noisy (the box): roc-syntax-color's cold checks took 0.58, 7.44 and 9.47 s (old) and 10.64, 21.30 and 22.32 s (RC1) of wall time for about 0.5 and 1.3 s of CPU, and we don't know where the rest goes. roc-screensaver's release builds had outliers of 115.5 s (RC1) and 63 to 86 s (old). Trust a difference under 2 times only when the CPU agrees.

roc-apps (Safari)

431 modules, 78,143 lines of Roc; built from canvas_apps/safari/web.roc; the old nightly at ff86bfaf, RC1 at 1ec61df8. The one-minute load average was 1.01 to 3.80 as the steps began.

stepconditionwall, oldwall, RC1CPU, oldCPU, RC1
roc checkcold5.813.626.834.55
warm2.290.082.400.08
root changed1.640.422.260.44
import changed2.050.862.971.17
build, devcold8.975.828.546.58
warm2.220.192.940.18
root changed4.620.615.240.61
import changed5.441.065.781.18
build, speedcold81.9227.4459.9028.23
warm40.9528.9340.8225.81
root changed44.2532.8045.4229.61
import changed52.7130.9949.6829.53
roc testcold7.203.309.324.29
warm2.680.073.370.08
root changed2.890.093.400.09
import changed4.540.566.130.77

roc-chat

229 modules, 45,278 lines of Roc; built from app/main.roc and app/Specs.roc; the old nightly at bab918d, RC1 at c8c532c. The one-minute load average was 0.69 to 1.92 as the steps began.

stepconditionwall, oldwall, RC1CPU, oldCPU, RC1
roc checkcold5.425.367.718.08
warm0.250.130.270.15
root changed0.340.650.380.69
import changed1.591.552.282.10
build, devcold15.257.3821.6710.83
warm5.801.217.951.28
root changed6.381.348.481.42
import changed7.342.7710.273.48
roc testcold27.0211.4538.1217.88
warm13.350.2319.170.21
root changed12.480.1518.200.17
import changed14.173.4920.134.89

roc-screensaver

60 modules, 8,904 lines of Roc; built from screensavers/lanterns/main.roc and screensavers/lanterns/web.roc; the old nightly at 388ac11, RC1 at 0940319. The one-minute load average was 1.68 to 2.49 as the steps began.

stepconditionwall, oldwall, RC1CPU, oldCPU, RC1
roc checkcold1.281.481.741.83
warm0.730.030.950.03
root changed0.790.031.000.03
import changed0.820.191.070.24
build, devcold2.131.962.932.25
warm1.030.101.230.09
root changed1.080.151.280.15
import changed2.060.302.470.33
build, speedcold31.2017.6726.0119.87
warm38.1317.4422.2618.11
root changed31.3321.8025.8018.95
import changed22.2618.4222.5720.67
roc testcold4.042.144.762.38
warm2.330.022.470.02
root changed2.240.032.480.03
import changed2.340.702.730.69

roc-markdown

32 modules, 6,413 lines of Roc; built from judge/answers.roc and package/main.roc; the old nightly at c3ced12, RC1 at f3bc41a. The one-minute load average was 1.27 to 4.94 as the steps began.

stepconditionwall, oldwall, RC1CPU, oldCPU, RC1
roc checkcold0.701.670.561.33
warm0.060.020.040.02
root changed0.070.040.050.03
import changed0.300.170.260.17
build, devcold1.391.411.291.27
warm0.550.050.510.04
root changed0.560.080.520.07
import changed1.200.211.040.20
build, speedcold10.179.9910.289.85
warm10.2010.539.839.89
root changed9.3510.119.329.73
import changed10.3010.2810.1210.29
roc testcold1.191.291.651.54
warm0.550.020.710.02
root changed0.500.020.660.02
import changed0.970.161.320.22

roc-syntax-color

16 modules, 5,329 lines of Roc; built from harness/main.roc and package/main.roc; the old nightly at 29517971, RC1 at 5ba4459d. The one-minute load average was 3.73 to 5.72 as the steps began.

stepconditionwall, oldwall, RC1CPU, oldCPU, RC1
roc checkcold7.4421.300.551.34
warm0.310.020.030.01
root changed0.120.200.050.02
import changed1.801.430.330.12
build, devcold1.901.951.741.37
warm1.910.031.000.03
root changed1.200.061.060.05
import changed1.420.131.310.12
roc testcold3.604.311.581.68
warm1.710.050.870.01
root changed2.040.120.930.02
import changed2.400.911.320.44

Output sizes

Bytes. roc-syntax-color's is an executable; roc-chat's, roc-markdown's and roc-screensaver's dev builds are x64 musl archives; the rest wasm.

repositorybuildbytes, oldbytes, RC1
roc-appsdev, web.roc2,414,6521,157,562
roc-appsspeed, web.roc694,691767,406
roc-chatdev, main.roc9,913,1186,944,412
roc-screensaverdev, main.roc1,578,8262,051,318
roc-screensaverspeed, web.roc309,719335,528
roc-markdowndev, answers.roc1,547,0101,624,096
roc-markdownspeed, answers.roc356,064402,030
roc-syntax-colordev, main.roc1,235,9602,882,344

The box

One shared DigitalOcean droplet: 2 CPUs (Intel, KVM), 7.8 GiB, no swap, Ubuntu 24.04, with other agent lanes running. We didn't wait for a clean box; each TSV row records the load average, and for roc-screensaver and roc-apps the count of other programs running.

What we found

Pinning note: the 0.1.0_RC1 tag is 15177e9, three commits before the announcement's 2eadd079; the binaries were built from 15177e9, and our pins name it.