.Dd $Mdocdate$ .Dt WABT 1 .Os .Sh NAME .Nm wasm-interp .Nd decode and run a WebAssembly binary file .Sh SYNOPSIS .Nm wasm-interp .Op options .Ar filename .Ar [arg]... .Sh DESCRIPTION .Nm read a file in the wasm binary format, and run in it a stack-based interpreter. .Pp The options are as follows: .Bl -tag -width Ds .It Fl Fl help Print this help message .It Fl Fl version Print version information .It Fl v , Fl Fl verbose Use multiple times for more info .It Fl Fl disable-exceptions Disable Experimental exception handling .It Fl Fl disable-mutable-globals Disable Import/export mutable globals .It Fl Fl disable-saturating-float-to-int Disable Saturating float-to-int operators .It Fl Fl disable-sign-extension Disable Sign-extension operators .It Fl Fl disable-simd Disable SIMD support .It Fl Fl enable-threads Enable Threading support .It Fl Fl enable-function-references Enable Typed function references .It Fl Fl disable-multi-value Disable Multi-value .It Fl Fl disable-tail-call Disable Tail-call support .It Fl Fl disable-bulk-memory Disable Bulk-memory operations .It Fl Fl disable-reference-types Disable Reference types (externref) .It Fl Fl disable-annotations Disable Custom annotation syntax .It Fl Fl enable-code-metadata Enable Code metadata .It Fl Fl enable-gc Enable Garbage collection .It Fl Fl disable-memory64 Disable 64-bit memory .It Fl Fl disable-multi-memory Disable Multi-memory .It Fl Fl disable-extended-const Disable Extended constant expressions .It Fl Fl disable-relaxed-simd Disable Relaxed SIMD .It Fl Fl enable-custom-page-sizes Enable Custom page sizes .It Fl Fl enable-compact-imports Enable Compact import section .It Fl Fl enable-wide-arithmetic Enable Wide arithmetic .It Fl Fl enable-all Enable all features .It Fl V , Fl Fl value-stack-size=SIZE Size in elements of the value stack .It Fl C , Fl Fl call-stack-size=SIZE Size in elements of the call stack .It Fl t , Fl Fl trace Trace execution .It Fl r , Fl Fl run-export=FUNCTION Run exported function by name .It Fl a , Fl Fl argument=ARGUMENT Add argument to an exported function execution .It Fl Fl wasi Assume input module is WASI compliant (Export WASI API the the module and invoke _start function) .It Fl e , Fl Fl env=ENV Pass the given environment string in the WASI runtime .It Fl d , Fl Fl dir=DIR Pass the given directory the the WASI runtime .It Fl Fl run-all-exports Run all the exported functions, in order. Useful for testing .It Fl Fl host-print Include an importable function named "host.print" for printing to stdout .El .Sh EXAMPLES parse binary file test.wasm, and type-check it .Pp .Dl $ wasm-interp test.wasm parse test.wasm and run all its exported functions .Pp .Dl $ wasm-interp test.wasm --run-all-exports parse test.wasm, run the exported functions and trace the output .Pp .Dl $ 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 .Pp .Dl $ wasm-interp test.wasm -V 100 --run-all-exports parse test.wasm, run specific exported function by name with argument .Pp .Dl $ wasm-interp test.wasm -r "func_sum" -a "i32:8" -a "i32:5" .Sh SEE ALSO .Xr wasm-objdump 1 , .Xr wasm-stats 1 , .Xr wasm-strip 1 , .Xr wasm-validate 1 , .Xr wasm2c 1 , .Xr wasm2wat 1 , .Xr wast2json 1 , .Xr wat-desugar 1 , .Xr wat2wasm 1 , .Xr spectest-interp 1 .Sh BUGS If you find a bug, please report it at .br .Lk https://github.com/WebAssembly/wabt/issues .