sigil-web-repl
A web-based REPL for trying Sigil in the browser. Uses sigil-wasm-runtime as the WebAssembly runtime and delimited continuations for interactive input/output between JavaScript and Sigil.
How it works
The REPL runs Sigil compiled to WebAssembly via Emscripten. It uses delimited continuations (prompts) to yield control back to JavaScript when waiting for user input:
repl-startbegins the REPL and yields waiting for input- JavaScript collects input from the user
- JavaScript calls back into WASM with
web-input-resume - The saved continuation is invoked with the input
- The REPL evaluates the expression and yields again for the next input
Requirements
Building this package requires Emscripten and the sigil-wasm-runtime C runtime. This is not a standard Sigil package build; it produces .js and .wasm output files for browser deployment.
Dependencies
sigil-wasm-runtime- WebAssembly C runtime (from sigil monorepo)sigil-stdlib- Standard librarysigil-repl- REPL commandssigil-ansi- Terminal color codes
Building
Building requires the Emscripten SDK. On Guix systems, use the included helper script to set up an FHS container with emsdk:
# Enter an Emscripten shell (installs emsdk on first run, ~400MB)
./scripts/emsdk-shell
# Install dependencies and build inside the shell
sigil deps install
sigil buildRead the rest
Or run the build directly:
./scripts/emsdk-shell sigil deps install && ./scripts/emsdk-shell sigil buildThis compiles the Sigil modules, links them into a web application (sigil-web-repl.js and sigil-web-repl.wasm), and copies the HTML assets to the output directory.
Usage
Add as a dependency in your package.sgl:
(from-git url: "codeberg:sigil/sigil-web-repl")License
BSD-3-Clause
$ git clone https://codeberg.org/sigil/sigil-web-repl
v0.7.0 — latest by version, released 1 Apr 2026
All releases — 1 tag in this repository.
One page per file, and every line has a permalink.
7af9fa3c
fdf94122
f7bb8862
c2e844e5
aa922631
3914d9b8
4d39e21c
The last 20 commits keep a page here. Everything older lives in the clone.