examples/

directory
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Aug 13, 2026 License: Apache-2.0

README

wazy examples

The following example projects can help you practice WebAssembly with wazy:

  • allocation - how to pass strings in and out of WebAssembly functions defined in Rust or TinyGo.
  • assemblyscript - how to configure special imports needed by AssemblyScript when not using WASI.
  • basic - how to use both WebAssembly and Go-defined functions.
  • import-go - how to define, import and call a Go-defined function from a WebAssembly-defined function.
  • component - how to run WebAssembly Component Model components, a WASI 0.2 wasi:cli/command, a component that uses the async ABI, and one that spawns a Component Model thread.
  • custom-wit - how to define your own WIT interface and implement it host-side in Go, including a resource, option, and a result<list<string>, variant>.
  • concurrent-instantiation - how to instantiate multiple Wasm instances per Goroutine concurrently.
  • multiple-results - how to return more than one result from WebAssembly or Go-defined functions.
  • multiple-runtimes - how to share compilation caches across multiple runtimes.
  • wasi - how to use I/O in your WebAssembly modules using WASI (WebAssembly System Interface).

Please open an issue if you would like to see another example.

Directories

Path Synopsis
allocation
rust command
tinygo command
zig command

Jump to

Keyboard shortcuts

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