Skip to content

Commit

Permalink
Add wat2wasm to README, along with some examples
Browse files Browse the repository at this point in the history
  • Loading branch information
binji committed Sep 17, 2020
1 parent 286625b commit 83b0607
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ It also includes the `wasp` tool, which has the following commands:
* `wasp dfg`: Generate a [dot graph][] of a function's [data-flow graph][]
* `wasp validate`: Validate a WebAssembly module
* `wasp pattern`: Find instruction sequence patterns
* `wasp wat2wasm`: Convert a Wasm text file to a Wasm binary file

## wasp dump examples

Expand Down Expand Up @@ -166,6 +167,32 @@ This produces results similar to those shown below. The columns are as follows:
total instructions: 3417737
```

## wasp wat2wasm examples

Convert `test.wat` to `test.wasm`.

```sh
$ wasp wat2wasm test.wat
```

Convert `test.wat` to `something.wasm`.

```sh
$ wasp wat2wasm test.wat -o something.wasm
```

Convert `test.wat` to `test.wasm`, but skip validation.

```sh
$ wasp wat2wasm test.wat --no-validate
```

Convert `test.wat` to `test.wasm`, and enable the SIMD feature.

```sh
$ wasp wat2wasm test.wat --enable-simd
```

[wabt]: https://github.com/WebAssembly/wabt
[dot graph]: http://graphviz.gitlab.io/documentation/
[control-flow graph]: https://en.wikipedia.org/wiki/Control-flow_graph
Expand Down

0 comments on commit 83b0607

Please sign in to comment.