WABT(1) | General Commands Manual | WABT(1) |
wat2wasm
—
translate from WebAssembly text format to the WebAssembly
binary format
wat2wasm |
[options] file |
wat2wasm
Read a file in the wasm text
format, check it for errors, and convert it to the wasm binary format.
The options are as follows:
--help
--version
-v
,
--verbose
--debug-parser
-d
,
--dump-module
--enable-exceptions
--disable-mutable-globals
--disable-saturating-float-to-int
--disable-sign-extension
--disable-simd
--enable-threads
--enable-function-references
--disable-multi-value
--enable-tail-call
--disable-bulk-memory
--disable-reference-types
--enable-annotations
--enable-code-metadata
--enable-gc
--enable-memory64
--enable-multi-memory
--enable-extended-const
--enable-all
-o
,
--output=FILE
-r
,
--relocatable
--no-canonicalize-leb128s
--debug-names
--no-check
Parse test.wat and write to .wasm binary file with the same name
$ 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
wasm-decompile(1), wasm-interp(1), wasm-objdump(1), wasm-opcodecnt(1), wasm-strip(1), wasm-validate(1), wasm2c(1), wasm2wat(1), wast2json(1), wat-desugar(1), spectest-interp(1)
If you find a bug, please report it at
https://github.com/WebAssembly/wabt/issues.
June 19, 2024 | Debian |