Skip to content

Build artifacts

Wago can keep the original Wasm, serialize native compilation, or package the runtime and module together.

OutputCommandPortableNeeds Wago installed
.wasmyour Wasm toolchainAcross supported runtimesYes
.wagowago buildNo, host-specificYes
Native executablewago compileOne target per buildNo

Precompile to .wago

sh
wago build app.wasm -o app.wago
wago run app.wago

This 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
./app

The module must export _start unless you bake in another function:

sh
wago compile math.wasm --invoke add -o add
./add 20 22

Cross-compile to a supported target:

sh
wago compile app.wasm --target linux/arm64 -o app-linux-arm64

Wago 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
  • --local uses the nearest wago.json.
  • --global uses the user-wide plugin set.
  • --bare disables both sets.
  • --plugin name,other adds plugins for this command.

Preview standalone work before changing anything:

sh
wago compile app.wasm --dry-run --json

Next

Released under the Apache 2.0 License.