lumbda/wasm/dist-repl
russell@unturf.com d4380c64c7
repl: portal save/resume — vault-backed tier checkpoints
Adds a portal-bar to the REPL between tabbar and transcript: a save
button + chip strip showing all saved checkpoints for the active tab.
Click a chip to restore, click × to delete.

Per-tier strategy:
  * c, python — call the tier's (portal-snapshot! NAME), then read the
    JSON blob out of MEMFS (Emscripten/Pyodide FS) and stash it in the
    encrypted vault entry. Restore reverses: hydrate MEMFS, then
    (portal-load! NAME) merges the bindings into the live env.
  * asm — no portal serializer in the WAT tier yet (would need a
    Cheney-aware walk). Falls back to transcript replay: save snapshots
    every successful prior input, restore reboots the tier and re-evals
    them in order.

Plumbing:
  * Worker bridge: new portal-save / portal-load message kinds wire
    MEMFS reads/writes to the main thread.
  * runner.js exposes portalSave / portalLoad — null when a tier
    hasn't implemented portals (asm stays grey).
  * C tier: replace EM_JS with extern + --js-library for js_lumbda_bend_call
    (EM_JS-generated declaration was unreachable from wasmImports at
    instantiate time, browsers threw "import object field ... not a
    Function"). FS added to EXPORTED_RUNTIME_METHODS so JS can reach
    pyodide.FS / Module.FS for MEMFS I/O.

Smoke-tested all three tiers headlessly: save → chip render → restore
round-trips clean on c / python / asm, zero console errors.
2026-06-15 07:43:07 -04:00
..
asm asm streaming: recycle the 64 KB output buffer after each flush 2026-06-15 06:36:00 -04:00
c repl: portal save/resume — vault-backed tier checkpoints 2026-06-15 07:43:07 -04:00
fonts/chunkfive repl: /repl/ page with encrypted multi-tab sessions 2026-06-14 12:50:35 -04:00
python playground: stream tier output line-by-line during eval 2026-06-14 20:25:47 -04:00
crypto.js repl: /repl/ page with encrypted multi-tab sessions 2026-06-14 12:50:35 -04:00
index.html repl: portal save/resume — vault-backed tier checkpoints 2026-06-15 07:43:07 -04:00
lumbda-logo-green.png repl: /repl/ page with encrypted multi-tab sessions 2026-06-14 12:50:35 -04:00
repl.css repl: portal save/resume — vault-backed tier checkpoints 2026-06-15 07:43:07 -04:00
repl.js repl: portal save/resume — vault-backed tier checkpoints 2026-06-15 07:43:07 -04:00
runner.js repl: portal save/resume — vault-backed tier checkpoints 2026-06-15 07:43:07 -04:00
style.css repl: portal save/resume — vault-backed tier checkpoints 2026-06-15 07:43:07 -04:00
worker.mjs repl: portal save/resume — vault-backed tier checkpoints 2026-06-15 07:43:07 -04:00