open-standards/wai/wai-web/reach/profiles.json
Transaction Science c4e592cfa4 wai-web: reach builds — L1 legalised, L2 MVP-lowered, J wasm2js, and an ES5 loader
The shipped wai-web package needs WebAssembly with sign-extension, non-trapping
float-to-int and bulk memory, and i64 crossing the JS boundary as BigInt.
reach/build.sh derives three more builds from that package with pinned tools
(binaryen version_123 by archive SHA-256; TypeScript, esbuild and acorn by
package-lock.json):

- L1: the shipped binary legalised at the JS interface, for engines where i64
  does not cross as BigInt;
- L2: MVP-lowered and legalised, at four profiles (full, verify_decode, verify,
  receipt), for MVP-only WebAssembly;
- J: the wasm2js translation, one ES5 script per profile, with an ES5-floor
  runtime and glue: memory views refreshed when the buffer changes, i64 values
  carried as Numbers where there is no BigInt.

wai-load.js (ES5) picks shipped, L1, L2 or J from feature probes alone and
says why; a rung can be forced for testing.

test/conformance.js (ES5) runs the workloads over the repository's corpora on
any rung and compares every output with the shipped build's; run-modern.mjs
forces every rung and profile on a modern Node and runs the demo verify
scripts against each full build.

Co-Authored-By: Claude Opus 5.5 <[email protected]>
2026-10-09 18:36:04 -04:00

32 lines
2 KiB
JSON

{
"about": "The reduced profiles of the MVP-lowered builds (L2 and J): which exports of wai_web_bg.wasm each keeps. wasm-metadce keeps these and whatever they reach, and drops the rest. A prefix keeps every export that starts with it, and keeps the class's __wbg_<prefix>free as well. 'always' is in every profile. The full profile keeps every export and is not listed. A page that calls a function outside its profile gets a TypeError from the glue.",
"always": {
"names": ["memory", "wasmMemoryBytes"],
"prefixes": ["__wbindgen_"]
},
"profiles": {
"receipt": {
"about": "Envelope parse, asset provenance (content hash, Ed25519 signature, Merkle chain), and the hashes.",
"names": ["parse", "detectVersion", "sha256Hex", "blake3Hex", "fnv1aHex",
"waienvelope_capability", "waienvelope_kind", "waienvelope_media", "waienvelope_intent",
"waienvelope_fallback", "waienvelope_payload_len", "__wbg_waienvelope_free"],
"prefixes": ["assetprovenance_"]
},
"verify": {
"about": "receipt, plus multi-rendition envelopes, pins, capability checks, stage identities, session claims and the output tree.",
"includes": ["receipt"],
"names": ["parseMulti", "stageContentHash", "stageLayerInfo", "verifyClaim", "verifyPin", "outputRoot",
"isCandidate", "isRegistered", "known_capabilities", "checkRefusal"],
"prefixes": ["waienvelope_", "waimulti_", "rendition_"]
},
"verify_decode": {
"about": "verify, plus the integer decoders (WIV1, WIH1, WIA1, WIS1, int_synth, the JSON integer forms) and the staged-delivery sink.",
"includes": ["verify"],
"names": ["decodeWiv1", "decodeWih1", "decodeWia1", "decodeWis1", "decodeIntAudio", "decodeIntVideo",
"decodeIntVideoPframes", "decodeIntHyper", "decodeIntHyperBin", "decodeIntSynth", "decodeIntSplat",
"intPayloadCost"],
"prefixes": ["decodedaudio_", "decodedvideo_", "decodedimage_", "decodedsplat_", "intpayloadcost_",
"stagebase_", "stagesink_"]
}
}
}