Real browser console on blog.rose-ash.com shows the WASM kernel (Jun-29 artifact, built with an older wasm_of_ocaml) emits the legacy 'try' exception instruction (deprecated; use try_table) + loadManifest does a sync XHR. Not breaking yet (SPA boots; the day's symptom was a stale cached loader, cleared by hard refresh) but will break when browsers drop 'try'. Fix = rebuild the kernel with the current 6.3.2 toolchain (may emit try_table) + verify in a real browser + make loadManifest async. hosts/ocaml/browser toolchain; schedule when the box is quiet with a rollback path, don't rush. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
2.5 KiB
Follow-up: WASM kernel uses deprecated try exception instruction (+ sync XHR)
Found: 2026-06-30, from a real browser console on blog.rose-ash.com (modern Chrome/Firefox).
Severity: not yet breaking — deprecation warnings. The SPA still boots (a hard refresh
cleared a stale cached loader, which was the day's actual symptom). But when browsers remove
the legacy try instruction, the WASM kernel will fail to instantiate → "SxKernel not found
after 5s" → no SPA (server-rendered pages + native-form writes still work; only SPA nav + the
interactive picker need the kernel).
The two warnings
WebAssembly exception handling 'try' instruction is deprecated … use 'try_table' instead(×6). The kernelshared/static/wasm/sx_browser.bc.wasm.assets/*.wasmwas compiled (Jun-29 artifact) with the legacy exception-handling encoding. wasm_of_ocaml standardized ontry_table; current toolchain is 6.3.2.Synchronous XMLHttpRequest on the main thread is deprecated—sx-platform.js:575,loadManifest()doesxhr.open("GET", …module-manifest.sx…, false)(sync). Browsers increasingly restrict sync XHR.
Fix
- Rebuild the kernel with the current toolchain.
bash hosts/ocaml/browser/build-all.sh(dune buildsbrowser/sx_browser.bc.wasm.js), thenbundle.shsyncs toshared/static/wasm/. Modern wasm_of_ocaml 6.x may emittry_tableby default → a fresh rebuild alone could fix #1. Verify: disassemble a.wasmunit (wasm-tools print/ grep fortry_tablevstry), then boot it in a REAL up-to-date browser (not just the older Playwright chromium, which still acceptstry) and confirm no deprecation warning + SxKernel registers. If 6.3.2 still emits legacytry, check for a wasm_of_ocaml flag or bump the compiler. loadManifest→ async. Change to an async fetch and restructure the boot so the manifest is awaited before module loading (it's currently consumed synchronously). Contained tohosts/ocaml/browser/sx-platform.js+ its copy inshared/static/wasm/.
Scope / ownership
hosts/ocaml/browser/ is the OCaml→WASM toolchain — generally out of the host loop's lane, though
the host loop has committed there for the blog SPA (b21ae05e, 689dae7d). A kernel rebuild affects
the LIVE SPA, so do it when the box is quiet, with real-browser verification, and a quick rollback
path (the Jun-29 .assets are the known-good artifact — keep a copy before overwriting). Not
urgent; schedule rather than rush.