Closed
Description
Parent: #366
Related: #263, #267, #134
The exact wg-3.0 audit exposed the remaining extended-constant-expression gap. zig-js now retains, validates, and evaluates the Core 3 integer arithmetic subset in every initializer context.
Exact affected roots at WebAssembly/spec@9d36019973201a19f9c9ebb0f10828b2fe2374aa:
test/core/data.wast: all 65 commands pass.test/core/global.wast: all 121 applicable commands pass; 3 text-format commands are N/A.test/core/elem.wast: every extended-expression command passes; the file is 146/151 with only five unrelated WebAssembly Core 3: reconcile element and reference import subtyping #389 subtyping cases remaining.
Acceptance:
- Decode the complete Core 3 integer extended constant-expression subset as bounded expression sequences.
- Validate operand/result types, imported immutable
global.get, index bounds, and constant-expression restrictions exactly. - Evaluate globals, data offsets, element offsets, and every other allowed initializer without exposing runtime stack state.
- Preserve deterministic byte-offset diagnostics and allocation rollback.
- Pass every command attributable to extended constant expressions in all three exact files with zero runner errors.
- Add focused units, bounded CI witnesses, registry/inventory evidence, and concise docs.
Evidence:
- Focused engine units: 4/4 pass, zero leaks.
- Exact data: 65/65 pass.
- Exact global: 121 applicable pass, 3 text-only N/A.
- Exact element extended-expression cases: all pass; residual 5 are tracked exclusively by WebAssembly Core 3: reconcile element and reference import subtyping #389.
Landed on main:
e21930b0feat(wasm): execute Core 3 constant expressions (WebAssembly Core 3: execute extended constant expressions #387)b4cd0f91ci(wasm): gate Core 3 constant expressions (WebAssembly Core 3: execute extended constant expressions #387)ddbe607adocs(wasm): update Core 3 audit evidence (WebAssembly Core 3: add an exact wg-3.0 conformance profile #366)
Metadata
Metadata
Assignees
Labels
No labels
Activity
feat(wasm): execute Core 3 constant expressions (#387)
ci(wasm): gate Core 3 constant expressions (#387)
chrisbbreuer commentedon Jul 20, 2026
Implemented and pushed to main. All exact Core 3 extended-constant-expression cases now pass; the five remaining elem.wast failures are isolated to #389.