docs/doc/wasm-interp.1.html
| WABT(1) | General Commands Manual | WABT(1) |
wasm-interp — decode and run a WebAssembly binary file
| wasm-interp | [options] file |
wasm-interp Read a file in the wasm binary format, and run it in a stack-based interpreter.
The options are as follows:
--helpPrint a help message--versionPrint version information-v, --verboseUse multiple times for more info--enable-exceptionsEnable Experimental exception handling--disable-mutable-globalsDisable Import/export mutable globals--disable-saturating-float-to-intDisable Saturating float-to-int operators--disable-sign-extensionDisable Sign-extension operators--disable-simdDisable SIMD support--enable-threadsEnable Threading support--enable-function-referencesEnable Typed function references--disable-multi-valueDisable Multi-value--enable-tail-callEnable Tail-call support--disable-bulk-memoryDisable Bulk-memory operations--disable-reference-typesDisable Reference types (externref)--enable-annotationsEnable Custom annotation syntax--enable-code-metadataEnable Code metadata--enable-gcEnable Garbage collection--enable-memory64Enable 64-bit memory--enable-multi-memoryEnable Multi-memory--enable-extended-constEnable Extended constant expressions--enable-allEnable all features-V, --value-stack-size=SIZESize in elements of the value stack-C, --call-stack-size=SIZESize in elements of the call stack-t, --traceTrace execution--wasiAssume input module is WASI compliant (Export WASI API the the module and invoke _start function)-e, --env=ENVPass the given environment string in the WASI runtime-d, --dir=DIRPass the given directory the the WASI runtime--run-all-exportsRun all the exported functions, in order. Useful for testing--host-printInclude an importable function named "host.print" for printing to stdout--dummy-import-funcProvide a dummy implementation of all imported functions. The function will log the call and return an appropriate zero value.
Parse binary file test.wasm, and type-check it
$ wasm-interp test.wasm
Parse test.wasm and run all its exported functions
$ wasm-interp test.wasm --run-all-exports
Parse test.wasm, run the exported functions and trace the output
$ wasm-interp test.wasm --run-all-exports --trace
Parse test.wasm and run all its exported functions, setting the value stack size to 100 elements
$ wasm-interp test.wasm -V 100 --run-all-exports
wasm-decompile(1), wasm-objdump(1), wasm-stats(1), wasm-strip(1), wasm-validate(1), wasm2c(1), wasm2wat(1), wast2json(1), wat-desugar(1), wat2wasm(1), spectest-interp(1)
If you find a bug, please report it at
https://github.com/WebAssembly/wabt/issues.
| September 23, 2025 | Debian |