CLI
A standalone runner ships in the box. It takes core modules and WASI 0.1; components go through the library.
go install github.com/samyfodil/wazy/cmd/wazy@latestRelease binaries for Linux, macOS and Windows are built CGO_ENABLED=0.
wazy run
Section titled “wazy run”wazy run app.wasm arg1 arg2wazy run -mount=.:/:ro -env-inherit app.wasmArguments after the .wasm path go to the guest. The guest gets stdin, stdout and stderr.
| Flag | |
|---|---|
-mount=<host>:<guest>[:ro] |
Mount a host directory into the guest. Repeatable. :ro makes it read-only. |
-env=<key>=<value> |
Set one environment variable. Repeatable. |
-env-inherit |
Pass the process’s whole environment through. |
-listen=<host>:<port> |
Pre-open a listening socket for the guest. Repeatable. |
-timeout=<duration> |
Kill the guest after this long, e.g. -timeout=5s. |
-interpreter |
Force the interpreter instead of the optimizing compiler. |
-cachedir=<dir> |
Persist compiled machine code here; reused on the next run. |
-hostlogging=<scopes> |
Log host calls. Scopes: clock, filesystem, memory, proc, poll, random, sock. |
-hostlogging is the fastest way to find out why somebody else’s guest is failing — it prints
every WASI call the guest makes, with arguments.
wazy compile
Section titled “wazy compile”wazy compile -cachedir=/var/cache/wazy app.wasmCompiles ahead of time into the cache directory, so the first wazy run against the same cache
starts without a compilation pause. Same key rules as the library’s
compilation cache: module bytes, engine, features and wazy version.
wazy version
Section titled “wazy version”wazy versionConformance
Section titled “Conformance”This binary is what the wasi-testsuite runs against in CI — AssemblyScript, C and Rust suites, no skipped tests, on Linux, macOS and Windows.