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

NAME

4     wast2json — convert a file in the wasm spec test format to a JSON file
5     and associated wasm binary files
6

SYNOPSIS

8     wast2json [options] file
9

DESCRIPTION

11     wast2json Read a file in the wasm spec test format, check it for errors,
12     and convert it to a JSON file and associated wasm binary files.
13
14     The options are as follows:
15
16     --help  Print this help message
17
18     --version
19             Print version information
20
21     -v, --verbose
22             Use multiple times for more info
23
24     --debug-parser
25             Turn on debugging the parser of wast files
26
27     --enable-exceptions
28             Enable Experimental exception handling
29
30     --disable-mutable-globals
31             Disable Import/export mutable globals
32
33     --disable-saturating-float-to-int
34             Disable Saturating float-to-int operators
35
36     --disable-sign-extension
37             Disable Sign-extension operators
38
39     --disable-simd
40             Disable SIMD support
41
42     --enable-threads
43             Enable Threading support
44
45     --enable-function-references
46             Enable Typed function references
47
48     --disable-multi-value
49             Disable Multi-value
50
51     --enable-tail-call
52             Enable Tail-call support
53
54     --disable-bulk-memory
55             Disable Bulk-memory operations
56
57     --disable-reference-types
58             Disable Reference types (externref)
59
60     --enable-annotations
61             Enable Custom annotation syntax
62
63     --enable-code-metadata
64             Enable Code metadata
65
66     --enable-gc
67             Enable Garbage collection
68
69     --enable-memory64
70             Enable 64-bit memory
71
72     --enable-multi-memory
73             Enable Multi-memory
74
75     --enable-extended-const
76             Enable Extended constant expressions
77
78     --enable-all
79             Enable all features
80
81     -o, --output=FILE
82             output JSON file
83
84     -r, --relocatable
85             Create a relocatable wasm binary (suitable for linking with e.g.
86             lld)
87
88     --no-canonicalize-leb128s
89             Write all LEB128 sizes as 5-bytes instead of their minimal size
90
91     --debug-names
92             Write debug names to the generated binary file
93
94     --no-check
95             Don't check for invalid modules
96

EXAMPLES

98     Parse spec-test.wast, and write files to spec-test.json.  Modules are
99     written to spec-test.0.wasm, spec-test.1.wasm, etc.
100
101           $ wast2json spec-test.wast -o spec-test.json
102

SEE ALSO

104     wasm-decompile(1), wasm-interp(1), wasm-objdump(1), wasm-opcodecnt(1),
105     wasm-strip(1), wasm-validate(1), wasm2c(1), wasm2wat(1), wat-desugar(1),
106     wat2wasm(1), spectest-interp(1)
107

BUGS

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