WebAssembly / WebAssembly/wabt
can wast2json write out binary modules as they are without error checking?
Nobody has claimed this yet.
- Dominant language
- C++
- Stars
- 8.1k
- Forks
- 827
- Avg merge
- 4d 6h
- Merged PRs (30d)
- 18
Description
is there a way to make wast2json ignore errors in binary modules? ((module binary ...)
i want to convert wast files from exception-handling proposal.
eg. https://github.com/WebAssembly/exception-handling/blob/123ac59cb650e9537ce129bb2977243bcbe9a773/test/core/try_table.wast
i know that wabt doesn't support the latest version of the proposal yet.
however, as the reference interpreter from the proposal repo can covert modules into binary,
if wast2json can write out binary modules as they are without parsing, it would be usable to run (most of) these tests.
spacetanuki% ../../../interpreter/wasm ../try_table.wast -o try_table.bin.wast
spacetanuki% ~/git/wabt/b/wast2json --no-check try_table.bin.wast
try_table.bin.wast:1:2: error: error in binary module: @0x00000020: invalid section code: 13
(module binary
^^^^^^
try_table.bin.wast:9:2: error: error in binary module: @0x00000041: expected valid result type (got -0x17)
(module binary
^^^^^^
try_table.bin.wast:174:2: error: error in binary module: @0x00000038: invalid section code: 13
(module binary
^^^^^^
try_table.bin.wast:186:2: error: error in binary module: @0x00000016: expected valid result type (got -0x17)
(module binary
^^^^^^
spacetanuki%
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reproducing the reported wast2json --no-check failure with the linked try_table.wast example and trace handling of (module binary ...). Determine the existing command-line and binary-module behavior, then verify that unsupported binary modules can be written unchanged without the reported parsing errors.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- cpp
- Domain
- cli, tooling
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100