wacogo

package module
v0.0.0-...-5e687b0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Jun 1, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

README

wacogo

A WebAssembly Component Model (MVP) runtime for Go, built on wazero.

Wacogo loads component-model binaries, validates them, and instantiates them with full cross-component linking. Components implemented in Go plug into wasm consumers exactly as if they were loaded from a .wasm file.

Status

Experimental. The component-model MVP type surface works end-to-end — all primitives, string, list, tuple, option, result, record, variant, enum, flags, and resource (with constructor, methods, statics, and optional Drop) — plus cross-component adapter linking and CheckInstantiation subtype rigor.

Not yet supported: async, stream<T>, future<T>, error-context, include of worlds, and worlds with non-interface imports.

Install

go get github.com/partite-ai/wacogo

Requires Go 1.25 or later.


Use case 1: run a .wasm component

Use this path when you have a pre-built component (compiled from Rust, Go, Python, etc.) and want to call its exports from Go.

import (
    "context"
    "fmt"
    "log"
    "os"

    "github.com/partite-ai/wacogo"
    "github.com/partite-ai/wacogo/wasi"
)

func main() {
    ctx := context.Background()
    e := wacogo.NewEngine(ctx)
    defer e.Close(ctx)

    // Pre-built wasi:cli + wasi:http host imports plumbed to this process.
    w, err := wasi.NewWorld(ctx, e, &wasi.Config{
        Args:   os.Args[1:],
        Stdin:  os.Stdin,
        Stdout: os.Stdout,
        Stderr: os.Stderr,
    })
    if err != nil {
        log.Fatal(err)
    }
    defer w.Close(ctx)

    f, err := os.Open("component.wasm")
    if err != nil {
        log.Fatal(err)
    }
    defer f.Close()

    comp, err := e.LoadComponent(ctx, f)
    if err != nil {
        log.Fatal(err)
    }

    inst, err := comp.Instantiate(ctx, w.Imports()...)
    if err != nil {
        log.Fatal(err)
    }
    defer inst.Close(ctx)

    out, err := inst.ExportedFunc("greet").Call(ctx, wacogo.ValString("world"))
    if err != nil {
        log.Fatal(err)
    }
    fmt.Println(string(out[0].(wacogo.ValString)))
}

A component with no imports can be instantiated as comp.Instantiate(ctx). For exports nested inside an interface, use inst.ExportedInstance("ns:pkg/iface").ExportedFunc("name"). To wire individual imports manually, use wacogo.WithInstanceImport, wacogo.WithFuncImport, wacogo.WithModuleImport, wacogo.WithComponentImport, or wacogo.WithTypeImport.

Runnable demo: examples/wasi-greet/.


Use case 2: implement a component in Go (wacogo-witgen)

Use this path when you want to provide a WIT-described interface in Go and have wasm components import it.

wacogo-witgen reads a .wit file and emits Go bindings: a Go interface for you to implement, and a Factory that produces a *host.ComponentInstance ready to plug in as an instance import.

Install the generator
go install github.com/partite-ai/wacogo/cmd/wacogo-witgen@latest
Generate bindings

For a WIT file like:

package example:demo;

interface calc {
    add: func(a: u32, b: u32) -> u32;
}

world arith {
    export calc;
}

run:

wacogo-witgen generate \
    -w example:demo/arith \
    -o ./gen \
    -p github.com/x/y/gen \
    ./calculator.wit

This is also a good fit for go:generate:

//go:generate go run github.com/partite-ai/wacogo/cmd/wacogo-witgen generate -w example:demo/arith -o ./gen -p github.com/x/y/gen ./calculator.wit
Implement and wire it in
import (
    "context"

    "github.com/partite-ai/wacogo"
    "github.com/x/y/gen/example/demo/calc"
)

type myCalc struct{}

func (myCalc) Add(ctx context.Context, a, b uint32) (uint32, error)      { return a + b, nil }
func (myCalc) Subtract(ctx context.Context, a, b uint32) (uint32, error) { return a - b, nil }
func (myCalc) Multiply(ctx context.Context, a, b uint32) (uint32, error) { return a * b, nil }

ctx := context.Background()
e := wacogo.NewEngine(ctx)
defer e.Close(ctx)

fac, err := calc.NewFactory(ctx, e)
// ... handle err ...
defer fac.Close(ctx)

hostInst, err := fac.NewInstance(ctx, myCalc{}, nil)
// ... handle err ...
defer hostInst.Close(ctx)

// Wire hostInst into a wasm consumer as an instance import:
//   comp.Instantiate(ctx, wacogo.WithInstanceImport("example:demo/calc", hostInst.Core()))

See cmd/wacogo-witgen/README.md for the full CLI reference, the WIT-to-Go type mapping, resources, cross-package dependencies, and the <R> / <R>Impl patterns.


Examples

Directory Description
examples/wasi-greet/ Run a .wasm component with the full WASI 0.2 world.
examples/jsinterp/ Embed a JavaScript interpreter component.
examples/calculator/ Implement a WIT interface in Go and call it from a wasm consumer.
examples/host-imports/ Two Go-implemented components wired together with cross-package resource sharing.

Contributing

See CONTRIBUTING.md for package layout, the build / test / regenerate-fixtures workflow, and coding guidelines.

Documentation

Overview

Package wacogo is a WebAssembly Component Model (MVP) runtime. It builds on wazero as the core wasm execution engine and adds component-model linking, loading, and instantiation on top.

The entry point is Engine: construct one with NewEngine, load components from binaries with LoadComponent, call Instantiate on the returned Component to obtain a running ComponentInstance, and mint host-side components via NewHostBuilder.

Index

Constants

View Source
const SortComponent = core.SortComponent

SortComponent identifies a nested-component definition.

View Source
const SortCoreFunc = core.SortCoreFunc

SortCoreFunc identifies a core-wasm func definition.

View Source
const SortCoreGlobal = core.SortCoreGlobal

SortCoreGlobal identifies a core-wasm global definition.

View Source
const SortCoreInstance = core.SortCoreInstance

SortCoreInstance identifies a core-wasm instance definition.

View Source
const SortCoreMemory = core.SortCoreMemory

SortCoreMemory identifies a core-wasm memory definition.

View Source
const SortCoreModule = core.SortCoreModule

SortCoreModule identifies a core-wasm module definition.

View Source
const SortCoreTable = core.SortCoreTable

SortCoreTable identifies a core-wasm table definition.

View Source
const SortFunc = core.SortFunc

SortFunc identifies a component-level func definition.

View Source
const SortInstance = core.SortInstance

SortInstance identifies a component-level instance definition.

View Source
const SortType = core.SortType

SortType identifies a component-level type definition.

View Source
const SortValue = core.SortValue

SortValue identifies a component-level value definition.

Variables

This section is empty.

Functions

This section is empty.

Types

type CaseType

type CaseType = core.CaseType

CaseType describes one case of a TypeVariant.

type CompiledModule

type CompiledModule = core.CompiledModule

CompiledModule wraps a compiled core wasm module exposed by a component as a core-module export.

func WrapCompiledModule

func WrapCompiledModule(cm wazero.CompiledModule) *CompiledModule

WrapCompiledModule lifts a wazero.CompiledModule into a *CompiledModule suitable for use as a core-module import (see WithModuleImport). The caller retains ownership of the underlying compiled module.

type Component

type Component = core.Component

Component is an immutable, compiled component-model component ready for instantiation. Obtain one from (*Engine).LoadComponent.

type ComponentInstance

type ComponentInstance = core.ComponentInstance

ComponentInstance is a live instance of a Component. Single-threaded: the component-model spec forbids concurrent or reentrant use.

type ComponentType

type ComponentType = core.ComponentType

ComponentType represents a component-model component type. Reserved for future use.

type Engine

type Engine struct {
	// contains filtered or unexported fields
}

Engine owns the wazero runtime and is the entry point for loading components, instantiating them, and building host-side components.

Engine values are safe for concurrent use from multiple goroutines for Load/Instantiate; per-Engine state such as the validator arena is guarded by the runtime.

func NewEngine

func NewEngine(ctx context.Context, opts ...EngineOption) *Engine

NewEngine creates a new Engine with the given options.

func (*Engine) Close

func (e *Engine) Close(ctx context.Context) error

Close releases all resources held by the engine, including the underlying wazero runtime. After Close, the engine cannot be used.

func (*Engine) LoadComponent

func (e *Engine) LoadComponent(ctx context.Context, r io.Reader) (*Component, error)

LoadComponent parses, validates, and compiles a component-model binary read from r. The returned *Component is immutable and safe for concurrent Instantiate calls.

func (*Engine) NewHostBuilder

func (e *Engine) NewHostBuilder(name string) *host.Builder

NewHostBuilder returns a fresh host.Builder bound to this engine. Register functions, types, and resources on the returned builder and call Build to produce a reusable *host.Component template. name is used in error messages and synthesized module names; keep it short and descriptive.

func (*Engine) WazeroRuntime

func (e *Engine) WazeroRuntime() wazero.Runtime

WazeroRuntime returns the underlying wazero runtime. Use it to register host modules or compile raw core modules that sit alongside the component-model machinery; the runtime is shared with all components loaded through this engine.

type EngineOption

type EngineOption = core.EngineOption

EngineOption configures an Engine at construction time. Pass instances to NewEngine.

func WithRuntimeConfig

func WithRuntimeConfig(cfg wazero.RuntimeConfig) EngineOption

WithRuntimeConfig overrides the wazero RuntimeConfig used to build the engine's runtime. If unset, wacogo uses a default config with CoreFeaturesV2 and the extended-const proposal enabled.

type ExportDesc

type ExportDesc = core.ExportDesc

ExportDesc describes one entry in a Component's exports list.

type ExportedFunc

type ExportedFunc = core.ExportedFunc

ExportedFunc is a callable component-model function paired with the name it was exported under. Obtain instances from (*ComponentInstance).ExportedFunc.

type Field

type Field = core.Field

Field is one named field of a record value.

type FieldType

type FieldType = core.FieldType

FieldType describes one field of a TypeRecord.

type FuncType

type FuncType = core.FuncType

FuncType is a component-model function signature.

type ImportDesc

type ImportDesc = core.ImportDesc

ImportDesc describes one entry in a Component's imports list.

type InstanceType

type InstanceType = core.InstanceType

InstanceType represents a component-model instance type. Reserved for future use.

type InstantiateOption

type InstantiateOption = core.InstantiateOption

InstantiateOption configures a single (*Component).Instantiate call. The With* functions in this package construct values of this type.

func WithComponentImport

func WithComponentImport(name string, c *Component) InstantiateOption

WithComponentImport satisfies a named component import with the given *Component.

func WithFuncImport

func WithFuncImport(name string, f *ExportedFunc) InstantiateOption

WithFuncImport satisfies a named func import with the given *ExportedFunc.

func WithInstanceImport

func WithInstanceImport(name string, i *ComponentInstance) InstantiateOption

WithInstanceImport satisfies a named instance import with the given *ComponentInstance.

func WithModuleImport

func WithModuleImport(name string, m *CompiledModule) InstantiateOption

WithModuleImport satisfies a named core module import with the given *CompiledModule.

func WithTypeImport

func WithTypeImport(name string, t Type) InstantiateOption

WithTypeImport satisfies a named type import with the given Type.

type ParamType

type ParamType = core.ParamType

ParamType describes one parameter of a FuncType.

type ResourceHandle

type ResourceHandle = core.ResourceHandle

ResourceHandle is the runtime handle for a resource value as it sits in a component instance's resource table.

type ResultType

type ResultType = core.ResultType

ResultType describes one result of a FuncType.

type Sort

type Sort = core.Sort

Sort enumerates the kinds of definition a component-model import or export can refer to. Values follow the names used in the component-model specification.

type Task

type Task = core.Task

Task is the per-call accounting record shared by the caller and callee CallContexts of a single component-model call.

type TransferTarget

type TransferTarget = core.TransferTarget

TransferTarget is the destination side of a resource handle transfer (LendTo/TransferOwn). Obtain one from a CallContext.

type Type

type Type = core.Type

Type is the interface satisfied by every component-model value type.

type TypeBool

type TypeBool = core.TypeBool

TypeBool is the component-model bool type.

type TypeBorrow

type TypeBorrow = core.TypeBorrow

TypeBorrow is the component-model borrow<R> handle type.

type TypeChar

type TypeChar = core.TypeChar

TypeChar is the component-model char type.

type TypeEnum

type TypeEnum = core.TypeEnum

TypeEnum is the component-model enum type.

type TypeF32

type TypeF32 = core.TypeF32

TypeF32 is the component-model f32 type.

type TypeF64

type TypeF64 = core.TypeF64

TypeF64 is the component-model f64 type.

type TypeFlags

type TypeFlags = core.TypeFlags

TypeFlags is the component-model flags type.

type TypeList

type TypeList = core.TypeList

TypeList is the component-model list<T> type.

type TypeOption

type TypeOption = core.TypeOption

TypeOption is the component-model option<T> type.

type TypeOwn

type TypeOwn = core.TypeOwn

TypeOwn is the component-model own<R> handle type.

type TypeRecord

type TypeRecord = core.TypeRecord

TypeRecord is the component-model record type.

type TypeResource

type TypeResource = core.TypeResource

TypeResource is the component-model resource type.

type TypeResult

type TypeResult = core.TypeResult

TypeResult is the component-model result<T,E> type.

type TypeS8

type TypeS8 = core.TypeS8

TypeS8 is the component-model s8 type.

type TypeS16

type TypeS16 = core.TypeS16

TypeS16 is the component-model s16 type.

type TypeS32

type TypeS32 = core.TypeS32

TypeS32 is the component-model s32 type.

type TypeS64

type TypeS64 = core.TypeS64

TypeS64 is the component-model s64 type.

type TypeString

type TypeString = core.TypeString

TypeString is the component-model string type.

type TypeTuple

type TypeTuple = core.TypeTuple

TypeTuple is the component-model tuple type.

type TypeU8

type TypeU8 = core.TypeU8

TypeU8 is the component-model u8 type.

type TypeU16

type TypeU16 = core.TypeU16

TypeU16 is the component-model u16 type.

type TypeU32

type TypeU32 = core.TypeU32

TypeU32 is the component-model u32 type.

type TypeU64

type TypeU64 = core.TypeU64

TypeU64 is the component-model u64 type.

type TypeVariant

type TypeVariant = core.TypeVariant

TypeVariant is the component-model variant type.

type Val

type Val = core.Val

Val is the interface satisfied by every component-model runtime value.

type ValBool

type ValBool = core.ValBool

ValBool is a component-model bool value.

type ValChar

type ValChar = core.ValChar

ValChar is a component-model char value.

type ValEnum

type ValEnum = core.ValEnum

ValEnum represents an enum case identified by a discriminant.

func NewValEnum

func NewValEnum(discriminant uint32) *ValEnum

NewValEnum constructs an enum value with the given case discriminant.

type ValF32

type ValF32 = core.ValF32

ValF32 is a component-model f32 value.

type ValF64

type ValF64 = core.ValF64

ValF64 is a component-model f64 value.

type ValFlags

type ValFlags = core.ValFlags

ValFlags represents a set of named boolean flags.

func NewValFlags

func NewValFlags(names []string, set ...string) *ValFlags

NewValFlags constructs a flags value with the given flag names and the specified flags pre-set. Unknown names in set are silently ignored.

type ValList

type ValList = core.ValList

ValList holds an ordered sequence of Val elements.

func NewValListOf

func NewValListOf[T Val](elems ...T) *ValList

NewValListOf constructs a *ValList whose elements are elems.

type ValOption

type ValOption = core.ValOption

ValOption represents an optional value (some or none).

func ValOptionNone

func ValOptionNone() *ValOption

ValOptionNone constructs a none option.

func ValOptionSome

func ValOptionSome(v Val) *ValOption

ValOptionSome constructs an option carrying v.

type ValOwnHandle

type ValOwnHandle = core.ValOwnHandle

ValOwnHandle is an owned resource handle value.

type ValRecord

type ValRecord = core.ValRecord

ValRecord holds an ordered set of named fields.

func NewValRecord

func NewValRecord(fields ...Field) *ValRecord

NewValRecord constructs a record from the given fields in order.

type ValResult

type ValResult = core.ValResult

ValResult represents either an ok value or an error value.

func ValResultErr

func ValResultErr(v Val) *ValResult

ValResultErr constructs an error result carrying v.

func ValResultOk

func ValResultOk(v Val) *ValResult

ValResultOk constructs an ok result carrying v.

type ValS8

type ValS8 = core.ValS8

ValS8 is a component-model s8 value.

type ValS16

type ValS16 = core.ValS16

ValS16 is a component-model s16 value.

type ValS32

type ValS32 = core.ValS32

ValS32 is a component-model s32 value.

type ValS64

type ValS64 = core.ValS64

ValS64 is a component-model s64 value.

type ValString

type ValString = core.ValString

ValString is a component-model string value.

type ValU8

type ValU8 = core.ValU8

ValU8 is a component-model u8 value.

type ValU16

type ValU16 = core.ValU16

ValU16 is a component-model u16 value.

type ValU32

type ValU32 = core.ValU32

ValU32 is a component-model u32 value.

type ValU64

type ValU64 = core.ValU64

ValU64 is a component-model u64 value.

type ValVariant

type ValVariant = core.ValVariant

ValVariant represents a variant case identified by a discriminant and an optional payload.

func NewValVariant

func NewValVariant(discriminant uint32, payload Val) *ValVariant

NewValVariant constructs a variant value with the given discriminant and payload. payload may be nil for cases that carry no value.

Directories

Path Synopsis
cmd
wacogo-witgen command
Command wacogo-witgen generates Go bindings for a WIT file.
Command wacogo-witgen generates Go bindings for a WIT file.
examples
calculator command
Calculator example: implements a WIT interface in Go, wires it into a wasm component, calls add through the wasm boundary.
Calculator example: implements a WIT interface in Go, wires it into a wasm component, calls add through the wasm boundary.
calculator/gen/example/demo/calc
Package calc provides Go bindings for the example:demo/calc interface.
Package calc provides Go bindings for the example:demo/calc interface.
host-imports command
Host-imports example: two Go-implemented components wired together.
Host-imports example: two Go-implemented components wired together.
host-imports/gen/example/host-imports/filesystem
Package filesystem provides Go bindings for the example:host-imports/filesystem interface.
Package filesystem provides Go bindings for the example:host-imports/filesystem interface.
host-imports/gen/example/host-imports/streams
Package streams provides Go bindings for the example:host-imports/streams interface.
Package streams provides Go bindings for the example:host-imports/streams interface.
jsinterp command
jsinterp loads a wrapper WASI component and uses it to evaluate a JavaScript file passed on the command line.
jsinterp loads a wrapper WASI component and uses it to evaluate a JavaScript file passed on the command line.
wasi-greet command
wasi-greet loads a wasi:cli@0.2.8 component from disk, wires up the full wasi:cli/imports world (stdio plumbed to this process), and invokes an exported func(name: string) -> string.
wasi-greet loads a wasi:cli@0.2.8 component from disk, wires up the full wasi:cli/imports world (stdio plumbed to this process), and invokes an exported func(name: string) -> string.
Package host builds component-model component instances in Go.
Package host builds component-model component instances in Go.
internal
canon
Package canon implements the WebAssembly Component Model canonical ABI via a visitor-driven closure-emission pipeline.
Package canon implements the WebAssembly Component Model canonical ABI via a visitor-driven closure-emission pipeline.
spectest
Package spectest holds shared helpers for running the WebAssembly component-model spec test suite vendored under testdata/spec/.
Package spectest holds shared helpers for running the WebAssembly component-model spec test suite vendored under testdata/spec/.
spectestgen command
spectestgen walks one or more directories of .wast files and produces matching JSON + .wasm fixtures via `wasm-tools json-from-wast`.
spectestgen walks one or more directories of .wast files and produces matching JSON + .wasm fixtures via `wasm-tools json-from-wast`.
wasi/gen/wasi/cli/environment
Package environment provides Go bindings for the wasi:cli/environment interface.
Package environment provides Go bindings for the wasi:cli/environment interface.
wasi/gen/wasi/cli/exit
Package exit provides Go bindings for the wasi:cli/exit interface.
Package exit provides Go bindings for the wasi:cli/exit interface.
wasi/gen/wasi/cli/stderr
Package stderr provides Go bindings for the wasi:cli/stderr interface.
Package stderr provides Go bindings for the wasi:cli/stderr interface.
wasi/gen/wasi/cli/stdin
Package stdin provides Go bindings for the wasi:cli/stdin interface.
Package stdin provides Go bindings for the wasi:cli/stdin interface.
wasi/gen/wasi/cli/stdout
Package stdout provides Go bindings for the wasi:cli/stdout interface.
Package stdout provides Go bindings for the wasi:cli/stdout interface.
Terminal input.
Terminal output.
wasi/gen/wasi/cli/terminalstderr
An interface providing an optional `terminal-output` for stderr as a link-time authority.
An interface providing an optional `terminal-output` for stderr as a link-time authority.
wasi/gen/wasi/cli/terminalstdin
An interface providing an optional `terminal-input` for stdin as a link-time authority.
An interface providing an optional `terminal-input` for stdin as a link-time authority.
wasi/gen/wasi/cli/terminalstdout
An interface providing an optional `terminal-output` for stdout as a link-time authority.
An interface providing an optional `terminal-output` for stdout as a link-time authority.
wasi/gen/wasi/clocks/monotonicclock
WASI Monotonic Clock is a clock API intended to let users measure elapsed time.
WASI Monotonic Clock is a clock API intended to let users measure elapsed time.
wasi/gen/wasi/clocks/timezone
Package timezone provides Go bindings for the wasi:clocks/timezone interface.
Package timezone provides Go bindings for the wasi:clocks/timezone interface.
wasi/gen/wasi/clocks/wallclock
WASI Wall Clock is a clock API intended to let users query the current time.
WASI Wall Clock is a clock API intended to let users query the current time.
wasi/gen/wasi/filesystem/preopens
Package preopens provides Go bindings for the wasi:filesystem/preopens interface.
Package preopens provides Go bindings for the wasi:filesystem/preopens interface.
wasi/gen/wasi/filesystem/types
WASI filesystem is a filesystem API primarily intended to let users run WASI programs that access their files on their existing filesystems, without significant overhead.
WASI filesystem is a filesystem API primarily intended to let users run WASI programs that access their files on their existing filesystems, without significant overhead.
wasi/gen/wasi/http/incominghandler
This interface defines a handler of incoming HTTP Requests.
This interface defines a handler of incoming HTTP Requests.
wasi/gen/wasi/http/outgoinghandler
This interface defines a handler of outgoing HTTP Requests.
This interface defines a handler of outgoing HTTP Requests.
wasi/gen/wasi/http/types
This interface defines all of the types and methods for implementing HTTP Requests and Responses, both incoming and outgoing, as well as their headers, trailers, and bodies.
This interface defines all of the types and methods for implementing HTTP Requests and Responses, both incoming and outgoing, as well as their headers, trailers, and bodies.
wasi/gen/wasi/io/poll
A poll API intended to let users wait for I/O events on multiple handles at once.
A poll API intended to let users wait for I/O events on multiple handles at once.
wasi/gen/wasi/io/streams
WASI I/O is an I/O abstraction API which is currently focused on providing stream types.
WASI I/O is an I/O abstraction API which is currently focused on providing stream types.
wasi/gen/wasi/io/wioerror
Package wioerror provides Go bindings for the wasi:io/error interface.
Package wioerror provides Go bindings for the wasi:io/error interface.
wasi/gen/wasi/random/insecure
The insecure interface for insecure pseudo-random numbers.
The insecure interface for insecure pseudo-random numbers.
wasi/gen/wasi/random/insecureseed
The insecure-seed interface for seeding hash-map DoS resistance.
The insecure-seed interface for seeding hash-map DoS resistance.
wasi/gen/wasi/random/random
WASI Random is a random data API.
WASI Random is a random data API.
wasi/gen/wasi/sockets/instancenetwork
This interface provides a value-export of the default network handle..
This interface provides a value-export of the default network handle..
wasi/gen/wasi/sockets/ipnamelookup
Package ipnamelookup provides Go bindings for the wasi:sockets/ip-name-lookup interface.
Package ipnamelookup provides Go bindings for the wasi:sockets/ip-name-lookup interface.
wasi/gen/wasi/sockets/network
Package network provides Go bindings for the wasi:sockets/network interface.
Package network provides Go bindings for the wasi:sockets/network interface.
wasi/gen/wasi/sockets/tcp
Package tcp provides Go bindings for the wasi:sockets/tcp interface.
Package tcp provides Go bindings for the wasi:sockets/tcp interface.
wasi/gen/wasi/sockets/tcpcreatesocket
Package tcpcreatesocket provides Go bindings for the wasi:sockets/tcp-create-socket interface.
Package tcpcreatesocket provides Go bindings for the wasi:sockets/tcp-create-socket interface.
wasi/gen/wasi/sockets/udp
Package udp provides Go bindings for the wasi:sockets/udp interface.
Package udp provides Go bindings for the wasi:sockets/udp interface.
wasi/gen/wasi/sockets/udpcreatesocket
Package udpcreatesocket provides Go bindings for the wasi:sockets/udp-create-socket interface.
Package udpcreatesocket provides Go bindings for the wasi:sockets/udp-create-socket interface.
wasm
Package wasm provides helpers for building WebAssembly binaries programmatically.
Package wasm provides helpers for building WebAssembly binaries programmatically.
witgen
Canonical-ABI metadata: byte size, alignment, flat slot count.
Canonical-ABI metadata: byte size, alignment, flat slot count.
tools
syncspec command
syncspec downloads the WebAssembly/component-model `test/` tree at the commit pinned in testdata/spec/UPSTREAM.txt and replaces the contents of testdata/spec/ with that tree.
syncspec downloads the WebAssembly/component-model `test/` tree at the commit pinned in testdata/spec/UPSTREAM.txt and replaces the contents of testdata/spec/ with that tree.
Package wasi houses the wacogo bindings for wasi p2.
Package wasi houses the wacogo bindings for wasi p2.
cli/environment
Package environment is wasi:cli/environment host component.
Package environment is wasi:cli/environment host component.
cli/exit
Package exit is the not-yet-implemented wasi:cli/exit host component.
Package exit is the not-yet-implemented wasi:cli/exit host component.
cli/stderr
Package stderr is the not-yet-implemented wasi:cli/stderr host component.
Package stderr is the not-yet-implemented wasi:cli/stderr host component.
cli/stdin
Package stdin is the wasi:cli/stdin host component.
Package stdin is the wasi:cli/stdin host component.
cli/stdout
Package stdout is the wasi:cli/stdout host component.
Package stdout is the wasi:cli/stdout host component.
cli/terminalinput
Package terminalinput is the not-yet-implemented wasi:cli/terminal-input host component.
Package terminalinput is the not-yet-implemented wasi:cli/terminal-input host component.
cli/terminaloutput
Package terminaloutput is the not-yet-implemented wasi:cli/terminal-output host component.
Package terminaloutput is the not-yet-implemented wasi:cli/terminal-output host component.
cli/terminalstderr
Package terminalstderr is the stub wasi:cli/terminal-stderr host component.
Package terminalstderr is the stub wasi:cli/terminal-stderr host component.
cli/terminalstdin
Package terminalstdin is the stub wasi:cli/terminal-stdin host component.
Package terminalstdin is the stub wasi:cli/terminal-stdin host component.
cli/terminalstdout
Package terminalstdout is the stub wasi:cli/terminal-stdout host component.
Package terminalstdout is the stub wasi:cli/terminal-stdout host component.
clocks/monotonicclock
Package monotonicclock implements the wasi:clocks/monotonic-clock host component on top of Go's time package.
Package monotonicclock implements the wasi:clocks/monotonic-clock host component on top of Go's time package.
clocks/timezone
Package timezone is the not-yet-implemented wasi:clocks/timezone host component.
Package timezone is the not-yet-implemented wasi:clocks/timezone host component.
clocks/wallclock
Package wallclock implements the wasi:clocks/wall-clock host component on top of Go's time package.
Package wallclock implements the wasi:clocks/wall-clock host component on top of Go's time package.
filesystem/preopens
Package preopens implements the wasi:filesystem/preopens host component.
Package preopens implements the wasi:filesystem/preopens host component.
filesystem/types
Package types is the not-yet-implemented wasi:filesystem/types host component.
Package types is the not-yet-implemented wasi:filesystem/types host component.
http/incominghandler
Package incominghandler is the not-yet-implemented wasi:http/incoming-handler host component.
Package incominghandler is the not-yet-implemented wasi:http/incoming-handler host component.
http/outgoinghandler
Package outgoinghandler is the not-yet-implemented wasi:http/outgoing-handler host component.
Package outgoinghandler is the not-yet-implemented wasi:http/outgoing-handler host component.
http/types
Package types is the not-yet-implemented wasi:http/types host component.
Package types is the not-yet-implemented wasi:http/types host component.
internal/wasierr
Package wasierr exposes errors shared by the wasi/* skeleton packages.
Package wasierr exposes errors shared by the wasi/* skeleton packages.
io/poll
Package poll is the not-yet-implemented wasi:io/poll host component.
Package poll is the not-yet-implemented wasi:io/poll host component.
io/streams
Package streams is the not-yet-implemented wasi:io/streams host component.
Package streams is the not-yet-implemented wasi:io/streams host component.
io/wioerror
Package wioerror is the not-yet-implemented wasi:io/error host component.
Package wioerror is the not-yet-implemented wasi:io/error host component.
random/insecure
Package insecure implements the wasi:random/insecure host component.
Package insecure implements the wasi:random/insecure host component.
random/insecureseed
Package insecureseed implements the wasi:random/insecure-seed host component.
Package insecureseed implements the wasi:random/insecure-seed host component.
random/random
Package random implements the wasi:random/random host component backed by Go's crypto/rand.
Package random implements the wasi:random/random host component backed by Go's crypto/rand.
sockets/instancenetwork
Package instancenetwork is the not-yet-implemented wasi:sockets/instance-network host component.
Package instancenetwork is the not-yet-implemented wasi:sockets/instance-network host component.
sockets/ipnamelookup
Package ipnamelookup is the not-yet-implemented wasi:sockets/ip-name-lookup host component.
Package ipnamelookup is the not-yet-implemented wasi:sockets/ip-name-lookup host component.
sockets/network
Package network is the not-yet-implemented wasi:sockets/network host component.
Package network is the not-yet-implemented wasi:sockets/network host component.
sockets/tcp
Package tcp is the not-yet-implemented wasi:sockets/tcp host component.
Package tcp is the not-yet-implemented wasi:sockets/tcp host component.
sockets/tcpcreatesocket
Package tcpcreatesocket is the not-yet-implemented wasi:sockets/tcp-create-socket host component.
Package tcpcreatesocket is the not-yet-implemented wasi:sockets/tcp-create-socket host component.
sockets/udp
Package udp is the not-yet-implemented wasi:sockets/udp host component.
Package udp is the not-yet-implemented wasi:sockets/udp host component.
sockets/udpcreatesocket
Package udpcreatesocket is the not-yet-implemented wasi:sockets/udp-create-socket host component.
Package udpcreatesocket is the not-yet-implemented wasi:sockets/udp-create-socket host component.
Package wasmparser provides a streaming parser and validator for WebAssembly Component Model binaries.
Package wasmparser provides a streaming parser and validator for WebAssembly Component Model binaries.
examples/dump command
Usage: dump <file.wasm>
Usage: dump <file.wasm>
examples/imports-exports command
Usage: imports-exports <file.wasm>
Usage: imports-exports <file.wasm>
examples/validate command
Usage: validate <file.wasm>
Usage: validate <file.wasm>
Package wasmtools embeds the wasip1 build of bytecodealliance/wasm-tools and runs it inside wazero, so callers can use wasm-tools without requiring the binary to be installed on the host.
Package wasmtools embeds the wasip1 build of bytecodealliance/wasm-tools and runs it inside wazero, so callers can use wasm-tools without requiring the binary to be installed on the host.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL