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

NAME

4     wat-desugar — parse .wat text form and print canonical flat format
5

SYNOPSIS

7     wat-desugar [options] file
8

DESCRIPTION

10     wat-desugar Parses .wat text form as supported by the spec interpreter
11     (s-expressions, flat syntax, or mixed) and prints "canonical" flat for‐
12     mat.
13
14     The options are as follows:
15
16     --help  Print this help message
17
18     --version
19             Print version information
20
21     -o, --output=FILE
22             Output file for the formatted file
23
24     --debug-parser
25             Turn on debugging the parser of wat files
26
27     -f, --fold-exprs
28             Write folded expressions where possible
29
30     --inline-exports
31             Write all exports inline
32
33     --inline-imports
34             Write all imports inline
35
36     --enable-exceptions
37             Enable Experimental exception handling
38
39     --disable-mutable-globals
40             Disable Import/export mutable globals
41
42     --disable-saturating-float-to-int
43             Disable Saturating float-to-int operators
44
45     --disable-sign-extension
46             Disable Sign-extension operators
47
48     --disable-simd
49             Disable SIMD support
50
51     --enable-threads
52             Enable Threading support
53
54     --enable-function-references
55             Enable Typed function references
56
57     --disable-multi-value
58             Disable Multi-value
59
60     --enable-tail-call
61             Enable Tail-call support
62
63     --disable-bulk-memory
64             Disable Bulk-memory operations
65
66     --disable-reference-types
67             Disable Reference types (externref)
68
69     --enable-annotations
70             Enable Custom annotation syntax
71
72     --enable-code-metadata
73             Enable Code metadata
74
75     --enable-gc
76             Enable Garbage collection
77
78     --enable-memory64
79             Enable 64-bit memory
80
81     --enable-multi-memory
82             Enable Multi-memory
83
84     --enable-extended-const
85             Enable Extended constant expressions
86
87     --enable-all
88             Enable all features
89
90     --generate-names
91             Give auto-generated names to non-named functions, types, etc.
92

EXAMPLES

94     Write output to stdout
95
96           $ wat-desugar test.wat
97
98     Write output to test2.wat
99
100           $ wat-desugar test.wat -o test2.wat
101
102     Generate names for indexed variables
103
104           $ wat-desugar --generate-names test.wat
105

SEE ALSO

107     wasm-decompile(1), wasm-interp(1), wasm-objdump(1), wasm-opcodecnt(1),
108     wasm-strip(1), wasm-validate(1), wasm2c(1), wasm2wat(1), wast2json(1),
109     wat2wasm(1), spectest-interp(1)
110

BUGS

112     If you find a bug, please report it at
113     https://github.com/WebAssembly/wabt/issues
114
115BSD                            February 8, 2023                            BSD
Impressum