(rontolisp)

compile to WASM & run in the browser · ← interpreter / compiler playground · prebuilt WASM demo → · minesweeper → loading runtime…

Two phases, both running entirely in your browser: first compile & load a set of Lisp definitions into a WebAssembly module, then execute — call any function from that module with arguments you supply. The module is compiled once by rontolisp's own WASM backend and kept; each call re-runs it in your browser's WebAssembly runtime without recompiling. Nothing is sent to a server.

1 compile & load definitions
Run the downloaded loaded.wasm outside the browser (wasmtime / Node.js)

The file bundles your definitions with a (print (eval (read))) driver, so you run it by piping a call expression to its stdin. Replace (fib 20) with any call.

wasmtime (needs WebAssembly GC, -W gc; wasmtime 14+):

echo '(fib 20)' | wasmtime run -W gc loaded.wasm

Node.js 22+ — save this as run.mjs:

import { readFile } from "node:fs/promises";
import { WASI } from "node:wasi";

const wasi = new WASI({ version: "preview1", returnOnExit: true });
const { instance } = await WebAssembly.instantiate(
  await readFile(process.argv[2]), wasi.getImportObject());
wasi.start(instance);

then pipe a call to it:

echo '(fib 20)' | node run.mjs loaded.wasm
2 execute — call a function
call: (fib 20)
(call result appears here)