1WABT(1)                   BSD General Commands Manual                  WABT(1)
2

NAME

4     wat2wasm — translate from WebAssembly text format to the WebAssembly bi‐
5     nary format
6

SYNOPSIS

8     wat2wasm [options] file
9

DESCRIPTION

11     wat2wasm translates from WebAssembly text format to the WebAssembly bi‐
12     nary format.
13
14     The options are as follows:
15
16     -v, --verbose
17             Use multiple times for more info
18
19     --help  Print a help message
20
21     --debug-parser
22             Turn on debugging the parser of wat files
23
24     -d, --dump-module
25             Print a hexdump of the module to stdout
26
27     --enable-exceptions
28             Experimental exception handling
29
30     --disable-mutable-globals
31             Import/export mutable globals
32
33     --enable-saturating-float-to-int
34             Saturating float-to-int operators
35
36     --enable-sign-extension
37             Sign-extension operators
38
39     --disable-simd
40             SIMD support
41
42     --enable-threads
43             Threading support
44
45     -o, --output=FILE
46             output wasm binary file
47
48     -r, --relocatable
49             Create a relocatable wasm binary (suitable for linking with e.g.
50             lld)
51
52     --no-canonicalize-leb128s
53             Write all LEB128 sizes as 5-bytes instead of their minimal size
54
55     --debug-names
56             Write debug names to the generated binary file
57
58     --no-check
59             Don't check for invalid modules
60

EXAMPLES

62     Parse and typecheck test.wat
63
64           $ wat2wasm test.wat
65
66     parse test.wat and write to binary file test.wasm
67
68           $ wat2wasm test.wat -o test.wasm
69
70     Parse spec-test.wast, and write verbose output to stdout (including the
71     meaning of every byte)
72
73           $ wat2wasm spec-test.wast -v
74

SEE ALSO

76     wasm-interp(1), wasm-objdump(1), wasm-opcodecnt(1), wasm-strip(1),
77     wasm-validate(1), wasm2c(1), wasm2wat(1), wast2json(1), wat-desugar(1),
78     spectest-interp(1)
79

BUGS

81     If you find a bug, please report it at
82     https://github.com/WebAssembly/wabt/issues
83
84BSD                              July 21, 2022                             BSD
Impressum