wabt includes the following commands:
Translate from WebAssembly text format to the WebAssembly binary format.
# parse and typecheck test.wat
wat2wasm test.wat
# parse test.wat and write to binary file test.wasm
wat2wasm test.wat -o test.wasm
# parse spec-test.wast, and write verbose output to stdout (including the
# meaning of every byte)
wat2wasm spec-test.wast -v
The inverse of wat2wasm, translate from the binary format back to the text format (also known as a .wat).
# parse and typecheck test.wat
wat2wasm test.wat
# parse test.wat and write to binary file test.wasm
wat2wasm test.wat -o test.wasm
# parse spec-test.wast, and write verbose output to stdout (including the
# meaning of every byte)
wat2wasm spec-test.wast -v
Validate a file in the WebAssembly binary format
# Validates the WebAssembly file
wasm-validate test.wasm
Remove sections of a WebAssembly binary file
# Validates the WebAssembly file
wasm-strip test.wasm
wast2json converts a file in the wasm spec test format to a JSON file and associated wasm binary files
# parse spec-test.wast, and write files to spec-test.json. Modules are written
# to spec-test.0.wasm, spec-test.1.wasm, etc.
wast2json spec-test.wast -o spec-test.json
./scripts/build_wasi.sh