Memory safety without a garbage collector

Scopes free what they own, so there is no collector pause and no lifetime to annotate. Shared ownership is ARC, back-edges use GenRef, and one binary checks, runs, and links the same source for four backends.

curl -fsSL https://rasmalai.rovelstars.com/install.sh | sh
Open the playground

01 / one value, two names

  1. 1 fn count(): Int {
  2. 2 let arr = [1, 2, 3]
  3. 3 let same = arr
  4. 4 arr = [4, 5]
  5. 5 let n = same.length()
  6. 6 return n
  7. 7 }
Two names, one array. The count rises on the copy, falls on the reassignment, and the last release frees the array on this thread.

The type checker runs in your browser

This is the real checker, compiled to wasm and running off-thread in your browser. Edit the source, press Re-JIT once to load the engine, and the same frontend the CLI runs answers in place.

rnx check, compiled to wasm on demand
src/shade.rnx on-demand check
—.———— ms

source (click to edit)

compiler output (real check, off-thread)

Hit Re-JIT to download the compiler engine and check your code.

Shared ownership is ARC, cycles are explicit

Objects are reference counted, and back-edges use GenRef<T>, so a cycle is a type you chose. Lints catch own-field closure captures, mutual strong fields, and allowed cycles that nothing clears.

scope of fn shade()
scope · fn shade() 0.260 ms
sun Vec4f live
acc Vec4f live
v Vec4f live
lit Vec4f live
dot Float
4 live / 0 freed / 0 retained

Values are released at the closing brace. Nothing is traced, scanned, or collected.

0
collector pauses Scopes free on the releasing thread.
2
reference types ARC for ownership, GenRef for back-edges.
3
cycle lints W104, W108, W109 report what stays open.

One intermediate representation, four backends

One canonical LIR feeds four backends: an interpreter, a Cranelift JIT, an LLVM JIT, and LLVM AOT. The test suite asserts stdout and exit codes match across all four.

src/shade.rnx through the compiler

Your editor already speaks rnx

Keywords, types, and strings light up as you type. Brackets match, blocks fold, docs peek on hover.

fn shade(sun: Vec4f): Float {
    defer { println!("shade done"); }
    let acc = Vec4f.splat(0.0);
    let i = 0;
    while i < 4 {
        acc = acc + sun;
        i = i + 1;
    }
    return acc.x();
}

Speed measured against other toolchains

Every workload is measured against the toolchains that solve it. The plot maps runtime against peak RAM or build time, and bottom-left wins. The methodology and raw run sit under the chart.

runtime against peak RAM or build time

Loading benchmark data...

What your current toolchain costs

Every tool charges a tax. Pick the one you have paid and see what Rasmalai does instead.

cost of the alternatives

The tax: puzzles and waiting

A thirty-minute borrow-checker negotiation over a circular graph, then a five-minute cold build to find out if you won. Real safety, billed hourly.

The bypass: the closing brace is the free point

Lexical scopes do the job lifetimes did: no annotations on linear logic, no refactors to satisfy the checker. This loop compiles in milliseconds and frees itself.

fn total(xs: Array<Int>): Int {
    let sum = 0;
    for x in xs { sum = sum + x; }
    return sum;
}

One binary for check, test, and build

Diagnostics, isolated tests, lint fixes that apply themselves, and native C-ABI imports all live behind one binary. Capabilities are proved at compile time, and rnx build --lib emits a static library plus header.

rnx check, test, lint, build

demo output for $ rnx check src/bad.rnx loads with site data.

Captured from the shipped CLI. Tree-hook diagnostics point at the exact column and suggest the fix; the workbench above runs the same checker in the browser.

Every publish is audited, then hashed

The server runs the compiler's analyzer over the source tree, rejects undeclared capabilities, canonicalizes and chunks it, then names the version by digest.

schematic: one package, four stages

publish

  • src/main.rnx
  • src/window.rnx
  • Project.config
  • LICENSE

permissions

fs:read, term:write

source only

analyse

parse, resolve, analyse

  • fs:read declared
  • term:write declared
  • net:http missing

fail closed; cached by bytes, imports, ceiling

store

new shared

install

  • rnx addceiling
  • chunksverified
  • Project.deplockpinned
Versions never change. Unpublish within 72 hours. OCI artifacts stay pinned.