WABT(1)
π WABT(1) π
okay bestie, welcome to the General Commands Manual page for WABT(1) β the main character here is wasm-interp, and she is ready to decode and run your WebAssembly binary file. no cap. π¦
πΈ NAME πΈ
wasm-interp β decode and run a WebAssembly binary file
β¨ SYNOPSIS β¨
wasm-interp [options] filename [arg]...
π DESCRIPTION π
So like, wasm-interp reads a file in the wasm binary format, and then it runs a stack-based interpreter in it. literally the whole vibe. π
The options are as follows, and yes bestie, every single one is included β no skips, fr fr:
--helpβ print this help message--versionβ print version information-v,--verboseβ use multiple times for more info--disable-exceptionsβ disable Experimental exception handling--disable-mutable-globalsβ disable Import/export mutable globals--disable-saturating-float-to-intβ disable Saturating float-to-int operators--disable-sign-extensionβ disable Sign-extension operators--disable-simdβ disable SIMD support--enable-threadsβ enable Threading support--enable-function-referencesβ enable Typed function references--disable-multi-valueβ disable Multi-value--disable-tail-callβ disable Tail-call support--disable-bulk-memoryβ disable Bulk-memory operations--disable-reference-typesβ disable Reference types (externref)--disable-annotationsβ disable Custom annotation syntax--enable-code-metadataβ enable Code metadata--enable-gcβ enable Garbage collection--disable-memory64β disable 64-bit memory--disable-multi-memoryβ disable Multi-memory--disable-extended-constβ disable Extended constant expressions--disable-relaxed-simdβ disable Relaxed SIMD--enable-custom-page-sizesβ enable Custom page sizes--enable-compact-importsβ enable Compact import section--enable-wide-arithmeticβ enable Wide arithmetic--enable-allβ enable all features-V,--value-stack-size=SIZEβ size in elements of the value stack-C,--call-stack-size=SIZEβ size in elements of the call stack-t,--traceβ trace execution-r,--run-export=FUNCTIONβ run an exported function by name-a,--argument=ARGUMENTβ add an argument to an exported function execution--wasiβ assume the input module is WASI compliant (export the WASI API from the module and invoke the_startfunction)-e,--env=ENVβ pass the given environment string in the WASI runtime-d,--dir=DIRβ pass the given directory to the WASI runtime--run-all-exportsβ run all the exported functions, in order. useful for testing--host-printβ include an importable function named"host.print"for printing to stdout
π₯ EXAMPLES π₯
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
parse test.wasm, run specific exported function by name with argument:
$ wasm-interp test.wasm -r func_sum -a i32:8 -a i32:5
π¦ SEE ALSO π¦
go be nosy with wasm-objdump(1), wasm-stats(1), wasm-strip(1), wasm-validate(1), wasm2c(1), wasm2wat(1), wast2json(1), wat-desugar(1), wat2wasm(1), and spectest-interp(1). the whole friend group is here. π
π BUGS π
If you find a bug, please report it at https://github.com/WebAssembly/wabt/issues.
this little masterpiece is from Debian, dated $Mdocdate$, and itβs the WABT(1) page β mwah, bye bestie πβ¨
π¦ where this page comes from
- arch rolling: wabt 1.0.42-1 Β· Apache-2.0
- π girlified by deepseek-ai/DeepSeek-V4.1-Flash-1017 on : a language model's rewrite of the original, under its terms