2025-03-14 21:59:59 -06:00
|
|
|
# wat2wasm
|
|
|
|
|
|
|
|
|
|
> Convert a file from the WebAssembly text format to the binary format.
|
2025-12-16 10:20:31 -07:00
|
|
|
> More information: <https://webassembly.github.io/wabt/doc/wat2wasm.1.html>.
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Parse and check a file for errors:
|
|
|
|
|
|
|
|
|
|
`wat2wasm {{file.wat}}`
|
|
|
|
|
|
|
|
|
|
- Write the output binary to a given file:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`wat2wasm {{file.wat}} {{[-o|--output]}} {{file.wasm}}`
|
2025-03-14 21:59:59 -06:00
|
|
|
|
|
|
|
|
- Display simplified representation of every byte:
|
|
|
|
|
|
2025-05-08 12:26:01 -06:00
|
|
|
`wat2wasm {{[-v|--verbose]}} {{file.wat}}`
|