Skip to content

Latest commit

 

History

History
176 lines (126 loc) · 3.85 KB

components.md

File metadata and controls

176 lines (126 loc) · 3.85 KB
description Author rich Wago documentation with synchronized tabs, cards, steps, API blocks, file trees, and WAT highlighting.

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

engine := wago.NewEngine()
module, err := engine.Compile(wasm)
if err != nil {
    return err
}
(module
  (func (export "answer") (result i32)
    i32.const 42))
wago run module.wasm

:::

Tabbed sections

Compile a module once when it will be instantiated more than once.

module, err := engine.Compile(wasm)

Create an isolated instance from the compiled module.

instance, err := module.Instantiate(ctx)

Call an exported WebAssembly function.

results, err := instance.InvokeValues(ctx, "answer")

Tabs with the same sync value remember the reader's choice and stay synchronized across the site.

Cards

Install Wago and run your first module. Learn the available project settings. Discover runtime extensions and integrations. Read Wago's implementation on GitHub.

Steps

curl -fsSL https://wago.sh/install.sh | sh

Point Wago at a WebAssembly binary or WAT source file.

Execute the module and inspect its result.

Status badges

stable experimental deprecated beta

Accordions

The validated module and native machine code can be reused by multiple isolated instances.

No. Wago is implemented in pure Go.

API endpoints

List published plugins. Record a completed plugin installation.

Comparisons

File trees

Code annotations

(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.