§18A.12 — the opaque, frozen handle preloadCauslWasm resolves and createCauslWasmSync consumes. It carries EVERYTHING the synchronous backend construct needs so that step holds ZERO awaits:

  • bridge — the resolved BridgeId this handle was prepared for. createCauslWasmSync validates this against the bridge it resolves the handle under and throws on a mismatch.
  • module — the compiled WebAssembly.Module (from the one async WebAssembly.compile).
  • imports — the resolved WebAssembly.Imports, already matched to the module's import descriptors (sidecar __wbg_* glue on the sidecar path; throw-on-call stubs on the legacy raw path).
  • sidecar — the wasm-bindgen _bg.js sidecar module when the sidecar path was taken (its __wbg_set_wasm re-point binds the instance exports + its marshaled surface IS the WasmBridgeExports); undefined on the legacy raw path.
  • computeImports — the causl-compute-imports.js snippet module the authoritative engine installs its __causl_compute / __causl_fire handlers into.
  • the resolved per-graph backend params (graphName, engineMode, batchedFlush) the WasmBackend constructor needs, computed async in preloadCauslWasm so the sync factory has nothing to resolve.

WIRE (epic #31 / issue #32) — the real loader port. The handle now carries module / sidecar / imports / computeImports; createCauslWasmSync runs the synchronous new WebAssembly.Instance link and the authoritative flip, then constructGraphOverEngine(createOpts, engine).

interface CauslWasmModule {
    bridge: BridgeId;
    epoch: number;
}

Properties

Properties

bridge: BridgeId
epoch: number

#146 — the cache GENERATION this handle was compiled under (see cacheEpoch). createCauslWasmSync rejects a handle whose stamp does not match the CURRENT generation: a handle carried ACROSS a cache reset points at a torn-down shared instance / stale _bg.js glue and MUST NOT re-instantiate. A handle from the live generation matches and is never spuriously rejected.