← All showcases

web — the showcases in the browser

Source on GitHub ↗

Three little browser apps, each powered by rakupp compiled to WebAssembly — the same interpreter as the CLI, running entirely client-side. No server and no JavaScript re-implementation: each app builds a Raku program (a showcase's own code plus your input) and shows what it prints.

AppWhat it does
markdown.htmllive Markdown editor — type on the left, see it rendered on the right
json.htmlJSON beautifier / minifier
regex.htmlRaku regex tester with live match highlighting + a grammar parse-tree explorer

Run them

No server. Generate the embedded assets once, then just open the HTML files:

showcase/web/bundle.sh
# then open showcase/web/index.html  (double-click, or `open showcase/web/index.html`)

bundle.sh builds Raku.js if needed (rakujs/build.sh), then writes lib/: the Emscripten loader, the WebAssembly binary as base64 (lib/rakujs-wasm.js), and the two CLI showcase sources the JSON/Markdown apps reuse (lib/sources.js). The pages load those with plain <script src> and run the interpreter on the page — so they work opened straight from disk, file://, no http server at all.

lib/ is git-ignored; re-run bundle.sh to refresh it after rebuilding Raku.js.

Don't want to build anything? Each tagged release attaches rakujs-showcase-web-<tag>.zip — these apps with the WebAssembly already embedded. Download, unzip, open index.html. No toolchain, no server.

How it works

So the app is thin; the actual Markdown/JSON/grammar work is the very same Raku code the CLI showcases run.

Running on the main thread (rather than a Web Worker like the playground) keeps this simple and file://-openable; the trade-off is no Stop button and a brief freeze on heavy input — fine for these keystroke-fast apps.

Notes / gotchas