Optional ReadonlybatchedC.4 (#1505) — per-graph batched-flush opt-in. Omitting this is
byte-identical to dev b15069fa (the load-bearing C.4 acceptance
property — no queue installed, pre-C.3 per-commit shadow path
unchanged). When supplied, a BatchedFlush queue is
installed on the returned backend with the configured afterN /
intervalMs. Per-graph, not global (option-c doc §2.3). No
adopter-visible perf change at v1.x even when opted in — the JS
engine remains SSOT; scaffolding for a future v2.x Rust-SSOT
cutover.
Optional ReadonlybridgeOverride the bridge picker. Defaults to detectBridge() —
probes the host and picks the fastest supported artifact.
Adopters with a known target (e.g. internal Node 24 service with WasmGC) can pin a bridge to skip detection cost and shrink the build.
Optional Readonlycommitlift-readat (causl/causl-core-rs#170) — bound on the wrapped TS
#graph's commit-history retention ring. Mirrors
import('../src/types.js').CreateCauslOptions.commitHistoryCap.
Threaded into the wrapped engine so the same-timeline TS oracle
mirrors the Rust engine's retention window — load-bearing for the
readAt / snapshotAt byte-identity invariant (the wrapped TS oracle
vs the rust-ssot Rust extern on the IDENTICAL seed-inclusive
commit timeline). Omitting it keeps the pre-lift-readat default
(cap 0 — dead retention).
causl/causl-wasm-ts#411: on createCauslWasm this bag is one of TWO
that accept the cap, and BOTH are read. The inner
create: CreateCauslOptions bag wins per field; a field only this bag
names is inherited. So
createCauslWasm({ create: { commitHistoryCap: 1000 } }) is a graph WITH
retention, and { commitHistoryCap: 1000, create: { commitHistoryCap: 3 } }
is a graph with a cap of 3. preloadCauslWasm accepts the cap here only
(it has no create bag) and BAKES it for the sync factory's boot
inheritance.
Optional ReadonlycomputeWIRE (epic #31 / issue #32) — explicit URL of the
causl-compute-imports.js snippet module. When omitted the factory
resolves it relative to the wasm artefact's directory by scanning
<bridge>/snippets/<hash>/ (the wasm-pack bundler-target layout).
Supply this when your bundler emits the snippet at a known asset URL.
Optional Readonlyfetchfetch override for non-browser/non-Node environments
(Cloudflare Workers, Deno without --allow-net, test
harnesses). Defaults to the global fetch.
Optionalinit: RequestInitOptionalinit: RequestInitOptional ReadonlygraphOptional name passed through to the underlying engine when
constructing the wrapped Graph. Used by the cross-backend
determinism gate (#685) and the migration round-trip suite
(#687): two backends must share a graphId for byte-equal IR
comparison, and the gate works around it by threading the same
name through both engines.
Defaults to '@causl/causl-wasm-ts/wasm:<bridge>' so unrelated callers
cannot accidentally collide with a TS-engine instance that uses
the default-minted name. Adopters who want migration between TS
and WASM backends pass the same name to createCausl({ name })
and loadWasmBackend({ graphName: name }).
Optional Readonlysnapshotlift-readat (#170) — bound on the wrapped TS #graph's per-commit
snapshot retention buffer (the readAt / snapshotAt window).
Mirrors
import('../src/types.js').CreateCauslOptions.snapshotRetentionCap.
See commitHistoryCap, including which bags accept it on
createCauslWasm and how the two merge (causl/causl-wasm-ts#411).
Optional ReadonlywasmOverride the base URL the WASM artifact is fetched from.
Defaults to the package-relative URL resolved through the
bundler's import.meta.url mechanism (works in webpack 5 +
experiments.asyncWebAssembly, Vite 5 + vite-plugin-wasm,
esbuild 0.20 + --loader:.wasm=file, and Node 22+ ESM).
Set this to an asset-server URL (e.g.
https://assets.example.com/causl/<ver>/gc-classic-bundler/) when
the host CSP connect-src directive forbids same-origin
fetches of .wasm blobs. It must be an origin YOU serve: a public
CDN is not available, because jsDelivr and unpkg mirror npmjs and
this package is private to the Gitea registry. Copy the artefact
out of node_modules/@causl/causl-wasm-ts/wasm-pkg/ at deploy
time. Adopters MUST whitelist the chosen
origin explicitly — the loader does not auto-fallback.
§18A.12 — options accepted by preloadCauslWasm / createCauslWasm / loadAuthoritativeWasm.
Extends WasmBackendOptions (bridge / wasmBaseUrl / fetch / graphName / batchedFlush / retention caps) with
computeImportsUrl— the #32 loader port landed, so the artefact + snippet resolution paths are real.#280 removed the two soft-path opt-ins this interface used to add (
fallbackToTsand its fork aliasfallbackToJs); see the note in the body.