Skip to content

Adjust binary encoding of import/export names#623

Open
alexcrichton wants to merge 1 commit intoWebAssembly:mainfrom
alexcrichton:fix-binary-format
Open

Adjust binary encoding of import/export names#623
alexcrichton wants to merge 1 commit intoWebAssembly:mainfrom
alexcrichton:fix-binary-format

Conversation

@alexcrichton
Copy link
Collaborator

The purpose of this commit is to address the discrepancy between the specification and wasm-tools discovered in #622. The history here is:

This commit is is an adjustment to Binary.md to fix these discrepancies. Notably exportname and importname productions, previously absent. The exportname' and importname' productions are now renamed to exportname and importname. Additioanlly the production with versionsuffix' have been renumbered to 0x02 while an 0x01 production was added which is the exact same as 0x00 (intended for historical compat). A note was updated in the 1.0 binary adjustments to clean this up.

Closes #622

The purpose of this commit is to address the discrepancy between the
specification and wasm-tools discovered in WebAssembly#622. The history here is:

* WebAssembly#222 - historical addition of `(interface "name")` as an import/export
  name.
* WebAssembly#263 - moral revert of the previous change where the kind of name was
  now encoded in the name instead. At this point `Binary.md` mistakenly
  no longer reflected what wasm-tools parsed.
* WebAssembly#536 - addition of more metadata to import/export names with a
  discriminator byte that overlapped the previous.

This commit is is an adjustment to `Binary.md` to fix these
discrepancies. Notably `exportname` and `importname` productions,
previously absent. The `exportname'` and `importname'` productions are
now renamed to `exportname` and `importname`. Additioanlly the
production with `versionsuffix'` have been renumbered to `0x02` while an
`0x01` production was added which is the exact same as `0x00` (intended
for historical compat). A note was updated in the 1.0 binary adjustments
to clean this up.

Closes WebAssembly#622
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Binary.md: inlineexport uses exportname but implementations encode exportname'

1 participant