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

NAME

4     wasm-interp — decode and run a WebAssembly binary file
5

SYNOPSIS

7     wasm-interp [options] file
8

DESCRIPTION

10     wasm-interp Read a file in the wasm binary format, and run it in a stack-
11     based interpreter.
12
13     The options are as follows:
14
15     --help  Print a help message
16
17     --version
18             Print version information
19
20     -v, --verbose
21             Use multiple times for more info
22
23     --enable-exceptions
24             Enable Experimental exception handling
25
26     --disable-mutable-globals
27             Disable Import/export mutable globals
28
29     --disable-saturating-float-to-int
30             Disable Saturating float-to-int operators
31
32     --disable-sign-extension
33             Disable Sign-extension operators
34
35     --disable-simd
36             Disable SIMD support
37
38     --enable-threads
39             Enable Threading support
40
41     --enable-function-references
42             Enable Typed function references
43
44     --disable-multi-value
45             Disable Multi-value
46
47     --enable-tail-call
48             Enable Tail-call support
49
50     --disable-bulk-memory
51             Disable Bulk-memory operations
52
53     --disable-reference-types
54             Disable Reference types (externref)
55
56     --enable-annotations
57             Enable Custom annotation syntax
58
59     --enable-code-metadata
60             Enable Code metadata
61
62     --enable-gc
63             Enable Garbage collection
64
65     --enable-memory64
66             Enable 64-bit memory
67
68     --enable-multi-memory
69             Enable Multi-memory
70
71     --enable-extended-const
72             Enable Extended constant expressions
73
74     --enable-all
75             Enable all features
76
77     -V, --value-stack-size=SIZE
78             Size in elements of the value stack
79
80     -C, --call-stack-size=SIZE
81             Size in elements of the call stack
82
83     -t, --trace
84             Trace execution
85
86     --wasi  Assume input module is WASI compliant (Export WASI API the the
87             module and invoke _start function)
88
89     -e, --env=ENV
90             Pass the given environment string in the WASI runtime
91
92     -d, --dir=DIR
93             Pass the given directory the the WASI runtime
94
95     --run-all-exports
96             Run all the exported functions, in order. Useful for testing
97
98     --host-print
99             Include an importable function named "host.print" for printing to
100             stdout
101
102     --dummy-import-func
103             Provide a dummy implementation of all imported functions. The
104             function will log the call and return an appropriate zero value.
105

EXAMPLES

107     Parse binary file test.wasm, and type-check it
108
109           $ wasm-interp test.wasm
110
111     Parse test.wasm and run all its exported functions
112
113           $ wasm-interp test.wasm --run-all-exports
114
115     Parse test.wasm, run the exported functions and trace the output
116
117           $ wasm-interp test.wasm --run-all-exports --trace
118
119     Parse test.wasm and run all its exported functions, setting the value
120     stack size to 100 elements
121
122           $ wasm-interp test.wasm -V 100 --run-all-exports
123

SEE ALSO

125     wasm-decompile(1), wasm-objdump(1), wasm-opcodecnt(1), wasm-strip(1),
126     wasm-validate(1), wasm2c(1), wasm2wat(1), wast2json(1), wat-desugar(1),
127     wat2wasm(1), spectest-interp(1)
128

BUGS

130     If you find a bug, please report it at
131     https://github.com/WebAssembly/wabt/issues
132
133BSD                            February 8, 2023                            BSD
Impressum