Appearance
Build artifacts
Wago can keep the original Wasm, serialize native compilation, or package the runtime and module together.
| Output | Command | Portable | Needs Wago installed |
|---|---|---|---|
.wasm | your Wasm toolchain | Across supported runtimes | Yes |
.wago | wago build | No, host-specific | Yes |
| Native executable | wago compile | One target per build | No |
Precompile to .wago
sh
wago build app.wasm -o app.wago
wago run app.wagoThis moves compilation out of the run path.
Keep the original Wasm
A .wago file is tied to its host architecture and Wago's compiled format. Rebuild it after an incompatible Wago update and for every architecture you support.
Build a standalone executable
sh
wago compile app.wasm -o app
./appThe module must export _start unless you bake in another function:
sh
wago compile math.wasm --invoke add -o add
./add 20 22Cross-compile to a supported target:
sh
wago compile app.wasm --target linux/arm64 -o app-linux-arm64Wago supports Darwin, Linux, and Windows on AMD64 and ARM64. Core features, plugins, parallelism, and compiler settings are fixed at build time.
Select plugin scope
sh
wago build --local app.wasm
wago compile --global app.wasm -o app
wago compile --bare app.wasm -o app--localuses the nearestwago.json.--globaluses the user-wide plugin set.--baredisables both sets.--plugin name,otheradds plugins for this command.
Preview standalone work before changing anything:
sh
wago compile app.wasm --dry-run --json