ASTRA → WebAssembly

A compiler you can look inside.

Write a little code. Make something visible. Follow every byte.

ProgramMandelbrot Set
Runs locally in your browser
mandelbrot.astra
⌘ / Ctrl ↵
Ready
Canvas240 × 180
Up to 500 px
Console
Compile—
WASM validate—
Execute—
Module—

Meet ASTRA

A small language with nothing to hide.

ORION compiles ASTRA directly into WebAssembly binary bytes. Your browser executes the result. Open the Lab to inspect the stages in between.

let x = 5
print (x + 3)

fn square(n)
  return (n * n)
end
print square(7)

Binary expressions use parentheses. Functions use comma-separated parameters. Loops and functions close with end. Numbers in variables are f32; logical operators evaluate both sides.

Run in an isolated worker. Stop at any time. Programs are limited to eight seconds and 1,000 console lines. Canvas writes outside its dimensions are ignored.

Your program, in a link.

The source is stored in the URL fragment. Anyone with this link can read and edit it. Shared programs are compiled on opening, but never run automatically.

Behind the picture