Many Livecode widgets can live across a wiki, paying for the engine once. The trick is a single shared URL for the engine files, and a parameterised shell that selects each stack by name. This page records the design and the measured numbers, from the first working demo on 18 July 2026.
# The problem Every Livecode export folder ships its own copy of the engine — identical bytes, different URLs. Browser caches key on the URL, so ten widgets in ten folders download the engine ten times. The copies here measured byte identical across Hexagon, Panel, Svg and Creator; only the address kept them apart.
# The shared shell `assets/wasm/shared/` holds one engine pair, the icu data, and one trimmed shell, `stack.html`. The shell reads `?zip=name.zip` and hands it to the engine through the `Module.livecodeStandalone` override — the hook Livecode Wasm documents. One engine URL, many stacks:
STACK https://wasm.livecode.wiki/assets/wasm/shared/stack.html?zip=hexagon.zip STACK https://wasm.livecode.wiki/assets/wasm/shared/stack.html?zip=panel.zip STACK https://wasm.livecode.wiki/assets/wasm/shared/stack.html?zip=svg.zip
# The measured numbers Three boots across one lineup, network recorded in the browser:
boot 1 Hexagon, cold 7.19 MB engine js 458 KB + wasm 6.36 MB + icu-core 275 KB + hexagon.zip 85 KB boot 2 Panel, same page 0.26 MB engine and icu all 304 — only panel.zip moves boot 3 Hexagon, another page ~2 KB every request 304 — nothing downloads
Two details worth knowing. The icu collation and iteration data — 6.8 MB more — load lazily, only if a stack sorts or segments text, so a cold boot costs half the naive total. And the server answers `cache-control: public, max-age=0` with an ETag, so every reuse is a conditional request answered 304: a few hundred bytes of headers. The engine files carry their version in their names — raising max-age on them would make reuse free of even the round trip.
# Why this matters for lineups A lineup is many pages side by side, and a visualisation or simulation heavy site wants a widget on every page. Shared engine caching makes that honest: the first widget costs seven megabytes, every further widget costs its stack alone — tens of kilobytes, the price of an image. By default widgets load and display where they stand; pages that want a lighter footprint mark items `BOOT click`, and a ten widget lineup then costs one engine, ten small zips, and the memory of whichever stacks are actually running. Simulations become as cheap to scatter through a site as diagrams.
# Where the demo lives The live demo is a plugin page, Wasm Widget Demo, shipped inside wiki-plugin-livecode and served on every site of a farm that carries the plugin. Live Wasm Demo on this site embeds the older per folder exports, for comparison.
# See - Livecode Wasm and Live Wasm Demo - Wasm Snips and Wasm Widget Demo - Livecode and Wasm and Livecode Wasm Windows