You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
typed-wasm has filed PR #76 — proposal 0001 Multi-Producer Carrier Sections for L2–L6 and L15, tracking typed-wasm#34. Ephapax is one of two current producers of typedwasm.ownership, so its review is gating before the proposal moves from [draft] → [review] → [accepted].
Disambiguation note (per the canonical doc): this review concerns Ephapax-the-language's src/ephapax-wasm/ codegen path, which targets typed-wasm. AffineScript is a separate language with its own producer. The two producers' reviews are independent — Ephapax's answer should reflect Ephapax's emission needs, not AffineScript's.
Why you specifically
The proposal explicitly names Ephapax's producer touchpoints:
src/ephapax-wasm/ — emits typedwasm.ownership on every compile.
src/ephapax-cli/ — exposes the verifier via ephapax compile --verify-ownership.
Any wire format we adopt has to be something Ephapax codegen can actually emit cleanly. Ephapax's dyadic structure (ephapax-linear + ephapax-affine sublanguages, one Rust crate, one AST) means both sublanguages must be able to round-trip whatever region/capability data the new sections demand.
What the proposal adds
Two new producer-neutral custom sections alongside the existing typedwasm.ownership:
Both versioned, lenient-readable, same shape as the existing section.rs codec. Field-by-field mapping to typed-wasm's Region.idr / Pointer.idr / ResourceCapabilities.idr is in §Proposal.
L14 (session) and L16 (choreography) are explicitly out of scope.
Specific things to look at
WasmType enum mapping — 11 variants (U8…WBool) encoded as u8 wasm_ty. Does this cover every type Ephapax emits? Any Ephapax-specific wasm types (e.g. WasmGC ref types, if/when Ephapax adopts them) that need a reserved encoding slot now?
PtrKind encoding (Scalar / PtrOwning / PtrBorrow / PtrExclusive) — does this map cleanly to Ephapax's borrow model in both sublanguages? Ephapax-linear and ephapax-affine differ in their substructural rules; both should be expressible at the wire level even if the source semantics differ.
Cardinality field (u32le, 1=single, n>1=fixed array, 0=unbounded). Does Ephapax emit any region field that's variable-length today?
Capability list per function — strictly-increasing u32le[] of capability indices, structurally encoding DistinctCaps. Free for Ephapax codegen, or does this add ordering work?
Ask
Please review the wire format in PR #76 (§Proposal, ~lines 60–140) and flag anything that's missing, wrongly typed, or expensive for Ephapax to emit — from either sublanguage. Once you've signed off, I'll promote the proposal to [review], then [accepted] and start landing the codec in the Rust verifier behind cargo feature = \"unstable-l2\".
No code changes asked of this repo yet — codegen of the new sections is the follow-up after [accepted], not this proposal.
Proposal 0002 (access-site carrier) merged. typed-wasm PR feat(stdlib): Argv — extern "env" pattern for wasm-host argv access #86 (2026-05-28) added docs/proposals/0002-access-site-carrier.adoc, which specifies the typedwasm.access-sites section (LEB128-per-field, ~5 B/access). This addresses Open Question §5 of proposal 0001 (option A — per-instruction access-site carrier). The wire format includes (func_idx, instruction_byte_offset, region_id, field_id) per typed access. Both this issue's review scope AND the affinescript paired review (#402) now span BOTH proposals.
Two review comments received 2026-05-30 answering the four questions above + assessing proposal 0002:
Second reviewer (12:43Z): comment 4582855717 — extended assessment including proposal 0002.
Both reviews greenlight the wire formats. Both recommend [draft] → [review] promotion conditional on tracking issues being filed for outstanding open questions. As of 2026-05-30 the following gating issues exist:
Ephapax sign-off status: the two reviews together satisfy this issue's gating role per proposal 0001 §"Coordination with downstream producers." Owner action: bump proposal 0001 + 0002 status [draft] → [review] when ready.
typed-wasm has filed PR #76 — proposal 0001 Multi-Producer Carrier Sections for L2–L6 and L15, tracking typed-wasm#34. Ephapax is one of two current producers of
typedwasm.ownership, so its review is gating before the proposal moves from[draft]→[review]→[accepted].Why you specifically
The proposal explicitly names Ephapax's producer touchpoints:
src/ephapax-wasm/— emitstypedwasm.ownershipon every compile.src/ephapax-cli/— exposes the verifier viaephapax compile --verify-ownership.Any wire format we adopt has to be something Ephapax codegen can actually emit cleanly. Ephapax's dyadic structure (ephapax-linear + ephapax-affine sublanguages, one Rust crate, one AST) means both sublanguages must be able to round-trip whatever region/capability data the new sections demand.
What the proposal adds
Two new producer-neutral custom sections alongside the existing
typedwasm.ownership:typedwasm.regions— carries L2 (region binding), L3 (type-compatible access), L4 (null safety), L5 (bounds-proof), L6 (result-type).typedwasm.capabilities— carries the L15 capability lattice (excluding L15-C per-call-site grants, deferred).Both versioned, lenient-readable, same shape as the existing
section.rscodec. Field-by-field mapping to typed-wasm'sRegion.idr/Pointer.idr/ResourceCapabilities.idris in §Proposal.L14 (session) and L16 (choreography) are explicitly out of scope.
Specific things to look at
WasmTypeenum mapping — 11 variants (U8…WBool) encoded asu8 wasm_ty. Does this cover every type Ephapax emits? Any Ephapax-specific wasm types (e.g. WasmGC ref types, if/when Ephapax adopts them) that need a reserved encoding slot now?PtrKindencoding (Scalar / PtrOwning / PtrBorrow / PtrExclusive) — does this map cleanly to Ephapax's borrow model in both sublanguages? Ephapax-linear and ephapax-affine differ in their substructural rules; both should be expressible at the wire level even if the source semantics differ.u32le, 1=single, n>1=fixed array, 0=unbounded). Does Ephapax emit any region field that's variable-length today?u32le[]of capability indices, structurally encodingDistinctCaps. Free for Ephapax codegen, or does this add ordering work?Ask
Please review the wire format in PR #76 (§Proposal, ~lines 60–140) and flag anything that's missing, wrongly typed, or expensive for Ephapax to emit — from either sublanguage. Once you've signed off, I'll promote the proposal to
[review], then[accepted]and start landing the codec in the Rust verifier behindcargo feature = \"unstable-l2\".No code changes asked of this repo yet — codegen of the new sections is the follow-up after
[accepted], not this proposal.Refs
🤖 Generated with Claude Code
Update 2026-05-30 — Proposal 0002 landed + paired reviews completed
Two material changes since this issue was filed:
Proposal 0002 (access-site carrier) merged. typed-wasm PR feat(stdlib): Argv — extern "env" pattern for wasm-host argv access #86 (2026-05-28) added
docs/proposals/0002-access-site-carrier.adoc, which specifies thetypedwasm.access-sitessection (LEB128-per-field, ~5 B/access). This addresses Open Question §5 of proposal 0001 (option A — per-instruction access-site carrier). The wire format includes(func_idx, instruction_byte_offset, region_id, field_id)per typed access. Both this issue's review scope AND the affinescript paired review (#402) now span BOTH proposals.Two review comments received 2026-05-30 answering the four questions above + assessing proposal 0002:
Both reviews greenlight the wire formats. Both recommend
[draft] → [review]promotion conditional on tracking issues being filed for outstanding open questions. As of 2026-05-30 the following gating issues exist:WBoolwire widthtypedwasm.region-imports) cross-module placeholdertypedwasm.capability-grants(L15-C v1.4.x) trackingTy::Borrow→SharedBorrow/ExclBorrowat emissionTw_section.{Encode,Decode}(dedupbuild_section)Ephapax sign-off status: the two reviews together satisfy this issue's gating role per proposal 0001 §"Coordination with downstream producers." Owner action: bump proposal 0001 + 0002 status
[draft] → [review]when ready.🤖 Updated 2026-05-30 from paired-review closeout.