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
{{ message }}
Repository navigation
Binary.md: inlineexport uses exportname but implementations encode exportname' #622
inlineexport ::= n:<exportname> si:<sortidx> => (export n si)
However, wasm-tools encodes inline export names using exportname' (with the discriminator byte prefix), which is the same encoding used by top-level export and exportdecl:
export ::= en:<exportname'> si:<sortidx> ed?:<externdesc>? => (export en si ed?)
exportdecl ::= en:<exportname'> ed:<externdesc> => (export en ed)
The 0x00 byte before the name length is the exportname' discriminator. If the spec intended plain exportname (= name = core:name), this byte would not be present and the encoding would instead be:
I've attempted to address this in #623 by adjusting Binary.md to match what wasm-tools parses today, notably accounting for a historical oddity that we'll want to clean up before 1.0.
Activity
Adjust binary encoding of import/export names
alexcrichton commentedon Mar 16, 2026
I've attempted to address this in #623 by adjusting
Binary.mdto match whatwasm-toolsparses today, notably accounting for a historical oddity that we'll want to clean up before 1.0.Adjust binary encoding of import/export names
Adjust binary encoding of import/export names (WebAssembly#623)