Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add WABT command aliases #1842

Merged
merged 2 commits into from
Oct 2, 2024
Merged

Conversation

fitzgen
Copy link
Member

@fitzgen fitzgen commented Oct 2, 2024

This adds a few aliases for WABT commands to make it easier to use wasm-tools for people that are used to the WABT tools. The aliases are:

  • wat2wasm -> parse
  • wasm2wat -> print
  • wast2json -> json-from-wast

This allows usage like

$ wasm-tools wasm2wat foo.wasm

which prints the WAT disassembly of foo.wasm to stdout.

This adds a few aliases for WABT commands to make it easier to use `wasm-tools`
for people that are used to the WABT tools. The aliases are:

* `wat2wasm` -> `parse`
* `wasm2wat` -> `print`
* `wast2json` -> `json-from-wast`

This allows usage like

```
$ wasm-tools wasm2wat foo.wasm
```

which prints the WAT disassembly of `foo.wasm` to `stdout`.
@alexcrichton
Copy link
Member

Nice! Mind adding a test for this too? Probably just one of the commands should be good enough

@alexcrichton alexcrichton added this pull request to the merge queue Oct 2, 2024
Merged via the queue into bytecodealliance:main with commit 39ea2ef Oct 2, 2024
30 checks passed
@fitzgen fitzgen deleted the wabt-aliases branch October 2, 2024 17:41
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