Capability flags reported by a Bridge implementation.

Each flag corresponds to a Wasm or host-platform proposal that — if present — collapses a layer of marshalling cost on the JS↔WASM boundary. The flags are surfaced on the interface (rather than inferred from Bridge.id) so consumers can branch on the capability they care about without enumerating bridge identities, and so future bridges with novel mixes of capabilities slot in without churning the type.

interface BridgeFeatures {
    gc: boolean;
    jsStringBuiltins: boolean;
    sharedMemory: boolean;
    stringView: boolean;
}

Properties

gc: boolean

WasmGC reference types (externref / ref.null any). When true, the bridge can hold GC-managed JS object references inside WASM tables without serialising them to JSON.

jsStringBuiltins: boolean

JS String Builtins — direct imports of JS string operations from the wasm:js-string import module. When true, the bridge avoids the UTF-8 round-trip for strings that cross the boundary.

sharedMemory: boolean

SharedArrayBuffer + Atomics + WebAssembly.Memory({ shared: true }). Reserved for the future threading EPIC; no consumers today, but surfaced so the multi-threaded bridge fits the same interface.

stringView: boolean

wasm:string-view — the proposal that exposes JS string slices to Wasm with code-point-native indexing. Reserved for the future string-view bridge; no consumers today.