Skip to content

Commit 4ac7a5a

Browse files
docs(proposals/0001): annotate v0 producer surface — flag reserved codepoints (#101)
## Summary Adds `=== v0 producer surface` subsection to `docs/proposals/0001-multi-producer-carrier-section.adoc`, recording what no producer at v0 exercises and explicitly flagging those codepoints as **reserved** (forward-compatible). Doc-only — no spec wire-format change, no verifier code change. ## Source of the finding Evidence-based per-producer surface measurements from the 2026-05-30 paired-review of ephapax#165 + affinescript#402: - **affinescript** (`lib/wasm.ml`, `lib/codegen.ml:180-190`): emits only `{I32, I64, F32, F64}`; WBool lowered to i32. - **ephapax** (`src/ephapax-syntax/src/lib.rs:49`, `src/ephapax-wasm/src/lib.rs:1290+`): emits only `BaseTy { Unit, Bool, I32, I64, F32, F64 }`; collapses borrow distinctions to `Linear`/`Unrestricted` before codegen. Cross-cutting result: **5 of 11 WasmType variants used**, **2-of-4 PtrKind variants from ephapax**, **cardinality≡1 from both**, **zero producers for typedwasm.capabilities** at v0. ## Policy stated Consumers MUST accept reserved codepoints (lenient-reader contract applies) and MUST NOT reject v0 modules that omit them. Producers introducing them in v1.x trigger either: 1. **Additive** version bump if wire shape extends, or 2. **Breaking** version bump if existing-codepoint semantics change. Verifier implementations should NOT preallocate handling for reserved codepoints at v0. ## Test plan - [ ] doc-render check (asciidoctor) on the modified proposal — no syntax errors. - [ ] visual sanity: subsection inserts cleanly between `L15-C` deferral note and `=== Versioning policy`. Closes #93 Refs #34 Refs #76 Refs hyperpolymath/ephapax#165 Refs hyperpolymath/affinescript#402 🤖 Generated with [Claude Code](https://claude.com/claude-code)
1 parent 3c90f37 commit 4ac7a5a

1 file changed

Lines changed: 39 additions & 0 deletions

File tree

docs/proposals/0001-multi-producer-carrier-section.adoc

Lines changed: 39 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -145,6 +145,45 @@ Mapping to `ResourceCapabilities.idr`:
145145
v1.4.x** (per LEVEL-STATUS) and needs a separate per-call-site grant
146146
record; out of scope for v1.
147147

148+
=== v0 producer surface
149+
150+
As of v0 (proposal acceptance), no shipping producer exercises the full
151+
wire surface defined above. Concretely:
152+
153+
* `wasm_ty` codepoints `0`–`5` (`U8, U16, U32, U64, I8, I16`) — no
154+
producer language surfaces narrow integer types at the type-system
155+
level. AffineScript emits `{I32, I64, F32, F64}` only (`lib/wasm.ml`);
156+
Ephapax exposes `BaseTy { Unit, Bool, I32, I64, F32, F64 }` only
157+
(`src/ephapax-syntax/`). `WBool` (codepoint `10`) is emitted by
158+
both producers but lowered to `i32` on the wire.
159+
* `kind` codepoints `1`–`3` (`PtrOwning, PtrBorrow, PtrExclusive`) are
160+
exercised only by AffineScript. Ephapax codegen erases the borrow
161+
distinction (`SharedBorrow`/`ExclBorrow`) before wasm emission and
162+
collapses to `Linear`/`Unrestricted` only, so an ephapax-emitted
163+
`typedwasm.regions` section would carry `kind ∈ {0, 1}` exclusively.
164+
* `cardinality` values other than `1` — variable-cardinality fields
165+
require array-as-field support, which no producer ships at v0.
166+
AffineScript arrays are length-prefixed runtime objects; Ephapax
167+
uses runtime list handles. Neither emits fixed-array struct fields.
168+
* The `typedwasm.capabilities` section as a whole — L15 has **no
169+
producer at v0**. The wire format is specified for forward
170+
compatibility, but no current producer emits this section.
171+
172+
These codepoints are **reserved** (forward-compatible): consumers
173+
MUST accept them when they appear (the lenient-reader contract
174+
applies) and MUST NOT reject a v0 module that omits them. A producer
175+
that begins emitting a reserved codepoint in v1.x triggers either:
176+
177+
. an **additive** version bump if only the wire shape extends, or
178+
. a **breaking** version bump if the semantics of an existing codepoint
179+
change.
180+
181+
Implementations of `crates/typed-wasm-verify/` should NOT preallocate
182+
handling for reserved codepoints at v0; hitting one in a v0 module
183+
signals either a future-version producer (reject with
184+
`UnsupportedCarrierVersion`) or a producer bug (reject with the
185+
appropriate `OwnershipError` variant).
186+
148187
=== Versioning policy
149188

150189
Both new sections start with `u16le version = 1`. Future versions:

0 commit comments

Comments
 (0)