Skip to content

libwabt.js: Add check option, equiv to wasm2wat's --no-check#2582

Merged
sbc100 merged 2 commits into
WebAssembly:mainfrom
wasmgroundup:main
Apr 9, 2025
Merged

libwabt.js: Add check option, equiv to wasm2wat's --no-check#2582
sbc100 merged 2 commits into
WebAssembly:mainfrom
wasmgroundup:main

Conversation

@pdubroy

@pdubroy pdubroy commented Apr 9, 2025

Copy link
Copy Markdown
Contributor

Description

When using the JS API, there's currently no way to get the equivalent of wasm2wat's --no-check option. This adds support for that.

  • Add a property named check to theoptions arg ofreadWasm (in wasm.post.js)
  • Add a checkbox to the demo to control the check option.

Screenshots

Here's the wasm2wat demo showing the new option, and with an example of wasm2wat on an invalid module:

CleanShot 2025-04-09 at 13 35 57@2x

(Note that the function body doesn't end with end.)

@sbc100 sbc100 merged commit 5fdc745 into WebAssembly:main Apr 9, 2025
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.

2 participants