The real compiler and VM, built to WebAssembly and running entirely in this tab. Nothing is uploaded and there is no server. Press Check to compile, Run to evaluate one definition, or Test twice to watch the content-addressed cache skip the second run.
Arguments are split on spaces. Anything that parses as a whole number arrives as an integer; everything else arrives as a string. The args box shows the chosen definition's parameter names as its placeholder.
The playground runs one module named play.rg, so imports across files are not available
here. input() is disabled, read_file/write_file work against an
in-memory filesystem that lasts until you reload, and programs are stopped after five seconds — which
is what an unbounded while loop will get you.
Eleven worked programs ship with the repo, and the interesting
ones are the multi-module programs the playground cannot host. Clone it and point the compiler at any
of them with --root.
A pure scoring core, a declared dispatch table, and an effectful shell — the intended shape of a rigid program. Three modules, sixteen definitions.
A Markdown-to-HTML site generator written in rigid: four modules, 54 definitions, 22 tests. The program used to test the test cache itself.
A JavaScript event registry ported across, with the “before” file kept beside it and the reference-exactness metric measured on the result.
$ git clone https://github.com/DavidRDudas/rigidlang
$ rigid test --root examples/press
22 executed, 0 skipped via content-address cache, 0 failed
$ rigid rdeps "score.rg#severity" --root examples/triage
Browse all eleven on GitHub, or read the tutorial if the syntax above is ahead of you.