# Wago documentation: complete corpus Canonical source: https://docs.wago.sh/ Page count: 10 This file is generated from the same Markdown sources as the human-facing documentation. --- Source page: https://docs.wago.sh/components Markdown: https://docs.wago.sh/raw/components.md # Documentation components Reusable components for clear, interactive Wago documentation. All components support keyboard navigation and narrow screens. ## Tabbed code examples Use VitePress's built-in code groups for examples in multiple languages or formats. ::: code-group ```go [Go] engine := wago.NewEngine() module, err := engine.Compile(wasm) if err != nil { return err } ``` ```wat [WAT] (module (func (export "answer") (result i32) i32.const 42)) ``` ```sh [CLI] wago run module.wasm ``` ## Tabbed sections ### Compile Compile a module once when it will be instantiated more than once. ```go module, err := engine.Compile(wasm) ``` ### Instantiate Create an isolated instance from the compiled module. ```go instance, err := module.Instantiate(ctx) ``` ### Run Call an exported WebAssembly function. ```go results, err := instance.Call(ctx, "answer") ``` Tabs with the same `sync` value remember the reader's choice and stay synchronized across the site. ## Cards ### Get started Install Wago and run your first module. ### Configuration Learn the available project settings. ### Plugin registry Discover runtime extensions and integrations. ### Source code Read Wago's implementation on GitHub. ## Steps ### Install Wago ```sh curl -fsSL https://wago.sh/install.sh | sh ``` ### Compile a module Point Wago at a WebAssembly binary or WAT source file. ### Run it Execute the module and inspect its result. ## Status badges stable experimental deprecated nightly ## Accordions ### What is compiled once? The validated module and native machine code can be reused by multiple isolated instances. ### Does Wago require cgo? No. Wago is implemented in pure Go. ## API endpoints ### GET /api/packages List published plugins. ### POST /api/packages/{name}/installs Record a completed plugin installation. ## Comparisons ## File trees - `.vitepress/` - `config.mts` - `theme/` - `getting-started.md` - `reference/` ## Code annotations ```wat (module (func (export "answer") (result i32) i32.const 42)) ``` The `answer` export is available to the host by name. The function returns one 32-bit integer. `i32.const` places the value `42` on the operand stack. --- Source page: https://docs.wago.sh/getting-started Markdown: https://docs.wago.sh/raw/getting-started.md # Getting started Install the Wago manager, select a runtime channel, and run a small WebAssembly module. > **Tip — Prerequisite:** The source installer requires Go 1.22 or newer. It prefers Git and can fall back to a GitHub source archive when necessary. ### Install the manager ```sh curl -fsSL https://wago.sh/install.sh | sh ``` The interactive installer defaults to `~/.wago/bin` and can add that directory to your shell path. ### Choose a runtime Your channel preference is shared with other channel tabs across the documentation. ### Canary ```sh wago version install canary ``` ### Nightly ```sh wago version install nightly ``` ### Official ```sh wago version install 0.0.0 ``` ### Download a small module ```sh curl -LO https://raw.githubusercontent.com/wago-org/wago/main/tests/testdata/fib.wasm ``` ### Run it ```sh wago run fib.wasm 30 ``` `run` validates and compiles the module before invoking the exported function. ## What was installed? On macOS, Wago uses the following default layout. Linux uses the corresponding XDG data, config, and cache directories; `WAGO_HOME` can override both layouts. - `~/.wago/` - `bin/` - `versions/` ## Next steps ### Configure a project Add project-level settings and runtime options. ### Browse plugins Extend Wago with host integrations and runtime services. --- Source page: https://docs.wago.sh/ Markdown: https://docs.wago.sh/raw/index.md # Wago documentation Wago is a Go-native WebAssembly runtime and compiler built for fast startup, low memory use, and straightforward embedding. Use these guides to run WebAssembly from the command line, embed Wago in Go, and extend the runtime with plugins. ## Start here ### Get started Install Wago, choose a release channel, and run your first module. ### Configuration Learn how Wago projects and runtime options are configured. ### Plugin registry Discover WASI, workers, pools, and other runtime extensions. ### Documentation components Browse the reusable components available to documentation authors. ## Choose your channel ### Canary bleeding edge Built from the most recent successful CI run on `main`. Best for testing upcoming changes. ```sh wago version install canary ``` ### Nightly daily The latest successful nightly release, useful for early access with a steadier cadence. ```sh wago version install nightly ``` ### Official recommended Pinned releases are the safest choice when reproducibility matters. ```sh wago version install 0.0.0 ``` --- Source page: https://docs.wago.sh/nightly/getting-started Markdown: https://docs.wago.sh/raw/nightly/getting-started.md # Getting started Install the Wago manager, select a runtime channel, and run a small WebAssembly module. > **Tip — Prerequisite:** The source installer requires Go 1.22 or newer. It prefers Git and can fall back to a GitHub source archive when necessary. ### Install the manager ```sh curl -fsSL https://wago.sh/install.sh | sh ``` The interactive installer defaults to `~/.wago/bin` and can add that directory to your shell path. ### Choose a runtime Your channel preference is shared with other channel tabs across the documentation. ### Canary ```sh wago version install canary ``` ### Nightly ```sh wago version install nightly ``` ### Official ```sh wago version install 0.0.0 ``` ### Download a small module ```sh curl -LO https://raw.githubusercontent.com/wago-org/wago/main/tests/testdata/fib.wasm ``` ### Run it ```sh wago run fib.wasm 30 ``` `run` validates and compiles the module before invoking the exported function. ## What was installed? On macOS, Wago uses the following default layout. Linux uses the corresponding XDG data, config, and cache directories; `WAGO_HOME` can override both layouts. - `~/.wago/` - `bin/` - `versions/` ## Next steps ### Configure a project Add project-level settings and runtime options. ### Browse plugins Extend Wago with host integrations and runtime services. --- Source page: https://docs.wago.sh/nightly/ Markdown: https://docs.wago.sh/raw/nightly/index.md # Wago documentation Wago is a Go-native WebAssembly runtime and compiler built for fast startup, low memory use, and straightforward embedding. Use these guides to run WebAssembly from the command line, embed Wago in Go, and extend the runtime with plugins. ## Start here ### Get started Install Wago, choose a release channel, and run your first module. ### Configuration Learn how Wago projects and runtime options are configured. ### Plugin registry Discover WASI, workers, pools, and other runtime extensions. ### Documentation components Browse the reusable components available to documentation authors. ## Choose your channel ### Canary bleeding edge Built from the most recent successful CI run on `main`. Best for testing upcoming changes. ```sh wago version install canary ``` ### Nightly daily The latest successful nightly release, useful for early access with a steadier cadence. ```sh wago version install nightly ``` ### Official recommended Pinned releases are the safest choice when reproducibility matters. ```sh wago version install 0.0.0 ``` --- Source page: https://docs.wago.sh/nightly/reference/configuration Markdown: https://docs.wago.sh/raw/nightly/reference/configuration.md # Configuration Wago keeps project intent in `wago.json` and exact, authority-bearing resolution in `wago-lock.json`. Commit both files when your project uses plugins. > **Tip — Editor support:** Add the schema URL to get completion, inline documentation, and typo detection in editors that support JSON Schema. ## Start a project ### Interactive ```sh wago init ``` Choose quick setup for a minimal manifest or full setup for an application or publishable plugin. ### Quick ```sh wago init --quick ``` ### Scripted ```sh wago init --full --kind application --name demo --yes ``` ## Manifest ```json { "$schema": "https://wago.sh/v0/schema.json", "plugins": { "wago-org/wasi": "^0.0.0" } } ``` Plugin entries are semantic-version constraints. `wago add` updates the manifest and resolves exact versions into the lockfile. ### FILE wago.json Human-authored project intent, package metadata, and plugin constraints. ### LOCK wago-lock.json Exact plugin versions, reviewed capability grants, and plugin-owned configuration. > **Warning — Keep authority in the lockfile:** Do not copy exact resolutions or capability grants into `wago.json`. The lockfile is parsed strictly and is the reproducible source of runtime authority. ## Add and inspect plugins ```sh wago add wago-org/wasi wago plugin list wago plugin check wago plugin plan ``` Use `wago status` for a compact view of the active runtime, project scope, plugins, and lockfile. ## Machine-level paths `WAGO_HOME` overrides the platform defaults. Without it, macOS keeps Wago state under `~/.wago`; Linux uses the corresponding XDG data, config, and cache directories. ```sh export WAGO_HOME="$PWD/.wago-home" wago status ``` --- Source page: https://docs.wago.sh/reference/configuration Markdown: https://docs.wago.sh/raw/reference/configuration.md # Configuration Wago keeps project intent in `wago.json` and exact, authority-bearing resolution in `wago-lock.json`. Commit both files when your project uses plugins. > **Tip — Editor support:** Add the schema URL to get completion, inline documentation, and typo detection in editors that support JSON Schema. ## Start a project ### Interactive ```sh wago init ``` Choose quick setup for a minimal manifest or full setup for an application or publishable plugin. ### Quick ```sh wago init --quick ``` ### Scripted ```sh wago init --full --kind application --name demo --yes ``` ## Manifest ```json { "$schema": "https://wago.sh/v0/schema.json", "plugins": { "wago-org/wasi": "^0.0.0" } } ``` Plugin entries are semantic-version constraints. `wago add` updates the manifest and resolves exact versions into the lockfile. ### FILE wago.json Human-authored project intent, package metadata, and plugin constraints. ### LOCK wago-lock.json Exact plugin versions, reviewed capability grants, and plugin-owned configuration. > **Warning — Keep authority in the lockfile:** Do not copy exact resolutions or capability grants into `wago.json`. The lockfile is parsed strictly and is the reproducible source of runtime authority. ## Add and inspect plugins ```sh wago add wago-org/wasi wago plugin list wago plugin check wago plugin plan ``` Use `wago status` for a compact view of the active runtime, project scope, plugins, and lockfile. ## Machine-level paths `WAGO_HOME` overrides the platform defaults. Without it, macOS keeps Wago state under `~/.wago`; Linux uses the corresponding XDG data, config, and cache directories. ```sh export WAGO_HOME="$PWD/.wago-home" wago status ``` --- Source page: https://docs.wago.sh/v0.0.0/getting-started Markdown: https://docs.wago.sh/raw/v0.0.0/getting-started.md # Getting started Install the pinned v0.0.0 release and run a small WebAssembly module. ### Install Wago ```sh curl -fsSL https://wago.sh/install.sh | sh wago version install 0.0.0 ``` ### Download the example ```sh curl -LO https://raw.githubusercontent.com/wago-org/wago/main/tests/testdata/fib.wasm ``` ### Run it ```sh wago run fib.wasm 30 ``` ### Configure a project Create a schema-backed manifest and reproducible plugin lockfile. ### Try nightly Preview the most recent successful nightly build. --- Source page: https://docs.wago.sh/v0.0.0/ Markdown: https://docs.wago.sh/raw/v0.0.0/index.md # Wago documentation You are reading the documentation for **Wago v0.0.0**. Use this documentation to get Wago running and learn how to configure it for your project. ## Start here - [Install Wago and run your first module](/v0.0.0/getting-started) - [Configure a Wago project](/v0.0.0/reference/configuration) --- Source page: https://docs.wago.sh/v0.0.0/reference/configuration Markdown: https://docs.wago.sh/raw/v0.0.0/reference/configuration.md # Configuration Wago v0.0.0 keeps project intent in `wago.json` and exact plugin resolution and authority in `wago-lock.json`. ```json { "$schema": "https://wago.sh/v0/schema.json", "plugins": { "wago-org/wasi": "^0.0.0" } } ``` ### Initialize ```sh wago init --quick ``` ### Add a plugin ```sh wago add wago-org/wasi ``` ### Verify the resolution ```sh wago plugin check wago plugin plan ``` > **Tip — Commit both files:** `wago.json` contains semantic-version constraints. The generated lockfile contains exact versions, reviewed capability grants, and plugin-owned configuration.