| 1 |
## wazero CLI |
| 2 |
|
| 3 |
The wazero CLI can be used to execute a standalone WebAssembly binary. |
| 4 |
|
| 5 |
### Installation |
| 6 |
|
| 7 |
```bash |
| 8 |
$ go install github.com/tetratelabs/wazero/cmd/wazero@latest |
| 9 |
``` |
| 10 |
|
| 11 |
### Usage |
| 12 |
|
| 13 |
The wazero CLI accepts a single argument, the path to a WebAssembly binary. |
| 14 |
Arguments can be passed to the WebAssembly binary itself after the path. |
| 15 |
|
| 16 |
```bash |
| 17 |
wazero run calc.wasm 1 + 2 |
| 18 |
``` |
| 19 |
|
| 20 |
In addition to arguments, the WebAssembly binary has access to stdout, stderr, |
| 21 |
and stdin. |
| 22 |
|