tinywasm-cli
The tinywasm-cli package installs the tinywasm binary for tinywasm. See tinywasm for the embedding API.
It is recommended to use the library directly instead of the CLI.
The crate also exposes reusable helpers such as tinywasm_cli::wast_runner::WastRunner so workspace tests can drive the same WAST execution logic directly.
Usage
Notes:
run,dump, andinspectaccept.wasm,.wat, and.twasminputs.- Use
-as the input path to read a module from stdin. - Without
--invoke,tinywasmexpects the module to have a start function or_startexport. compilewrites TinyWasm'stwasmarchive format.- Function invocation arguments are parsed from the export signature, so
tinywasm run --invoke add ./module.wasm 1 2works without repeating Wasm types on the command line. inspectuses ANSI colors automatically when writing to a terminal; setNO_COLOR=1to disable them.- Stack flags support both fixed sizes like
--value-stack-size 4096and dynamic sizes like--value-stack-dynamic 1024:8192. wastis a separate command for WebAssembly spec scripts and accepts files or folders containing.wastfiles.