docs/reference/web-runtime-gotchas.md
Linked from AGENTS.md. Hard-won WASM/browser-runtime bugs and workarounds that aren't
obvious from reading the TypeScript alone. See bindings/web/AGENTS.md for the SDK's
general architecture and build/test commands.
SharedArrayBuffer requires COOP/COEP headers (the minimal
example's vite.config.ts sets these). Safari additionally needs the
coi-serviceworker.js polyfill.rac_vlm_component_process causes a WASM OOM
("memory access out of bounds"), the Worker auto-recovers by creating a fresh WASM
instance on the next process() call rather than staying wedged.wasm_exports.cpp exposes EMSCRIPTEN_KEEPALIVE offset functions, and the
Offsets proxy reads them at runtime from the WASM module — so a C struct layout change
can't silently desync from the TS side.