An in-browser playground for the Riddle language,
powered by the compiler and browser-safe analysis modules from riddle-lsp, compiled to
WebAssembly.
Live: https://riddle-lang.github.io/playground/
packages/
compiler/ Rust → WASM adapter over riddlec and riddle-lsp
web/ Next.js frontend (CodeMirror 6 editor)
.github/
workflows/
deploy.yml clone riddle → build WASM + web → deploy a Pages artifact
# Clone the main riddle repo next to packages/
git clone --depth=1 https://github.com/riddle-lang/riddle.git packages/riddle-src
# Build (requires wasm-pack)
wasm-pack build packages/compiler --target web --out-dir ../web/public/wasm --releasecd packages/web
npm install
npm run devThe web app is a static export, so do not run it with next start. Preview a
production build with any static HTTP server pointed at packages/web/out.
Run compiles the generated C in the browser with the pinned Emception 4.2.0
Clang/WASM toolchain. Production execution requires HTTPS and cross-origin
isolation; the bundled COOP/COEP service worker performs the first-load reload.
Toolchain files are fetched lazily from jsDelivr and cached by the browser.
The debug profile compiles with clang -O0 (fastest Run cycle) while the
release profile keeps -O1 for faster generated code. Toolchain warmup
starts when the page loads, and unchanged sources skip clang entirely: linked
wasm binaries are cached in IndexedDB keyed by (toolchain, profile, source).
Set Settings → Pages → Build and deployment → Source to GitHub Actions.
No deployment branch is used: builds upload packages/web/out as a Pages artifact and
deploy it directly.
Pushes to this repository's main branch deploy with the latest Riddle main.
Manual runs can select a Riddle branch, tag, or commit SHA with riddle_ref.