Skip to content

Commit

Permalink
README: note wasm-tools v1.210.0 requirement
Browse files Browse the repository at this point in the history
  • Loading branch information
ydnar committed Jun 11, 2024
1 parent b949897 commit 954bda7
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -36,7 +36,7 @@ wit-bindgen-go generate wasi-cli.wit.json
Or pipe via `stdin`:

```sh
wasm-tools component wit -j ../wasi-cli/wit | wit-bindgen-go generate
wasm-tools component wit -j --all-features ../wasi-cli/wit | wit-bindgen-go generate
```

### JSON → WIT
Expand All @@ -49,16 +49,16 @@ wit-bindgen-go wit example.wit.json

### WIT → JSON

The [wit](./wit) package can decode a JSON representation of a fully-resolved WIT file. Serializing WIT into JSON requires [wasm-tools](https://crates.io/crates/wasm-tools) v1.0.42 or higher. To convert a WIT file into JSON, run `wasm-tools` with the `-j` argument:
The [wit](./wit) package can decode a JSON representation of a fully-resolved WIT file. Serializing WIT into JSON requires [wasm-tools](https://crates.io/crates/wasm-tools) v1.210.0 or higher. To convert a WIT file into JSON, run `wasm-tools` with the `-j` argument:

```sh
wasm-tools component wit -j example.wit
wasm-tools component wit -j --all-features example.wit
```

This will emit JSON on `stdout`, which can be piped to a file or another program.

```sh
wasm-tools component wit -j example.wit > example.wit.json
wasm-tools component wit -j --all-features example.wit > example.wit.json
```

## License
Expand Down

0 comments on commit 954bda7

Please sign in to comment.