⚡ API Patterns and Practices: Server-Side WebAssembly
Home Chapters Examples Diagrams Bibliography GitHub ↗
Home / Building Components in Rust & Go
Part 2 5 chapters

Building Components in Rust & Go

Build the first component in Rust and the first in Go, compose both against shared WIT worlds, and work through the debugging and error-handling patterns a Wasm component needs that a native binary doesn't.

Chapter 6

First Component in Rust

Implement the cargo world as a Rust component with cargo-component, from binding generation to a running Wasmtime instance.

24 min readRead →
Chapter 7

First Component in Go

Build the cargo-domain component in Go against the same WIT world with wit-bindgen-go and TinyGo, and see why standard go build can't finish the job.

24 min readRead →
Chapter 8

Composing Components and WIT Worlds

Plug a Rust or Go consumer component into a Rust or Go provider with wac, and run the result under wasmtime with no native host.

26 min readRead →
Chapter 9

Debugging WebAssembly

Inspect a component without running it, read a wasmtime trap backtrace from the Rust and Go providers, and see how far source-level debugging reaches today.

20 min readRead →
Chapter 10

Error and Exception Handling

A recoverable failure is a WIT result value and an unrecoverable one is a trap; how Rust and Go map their error handling onto each, and which one to use.

18 min readRead →
← Previous part Foundations Next part → Interfaces: HTTP & gRPC

API Patterns and Practices: Server-Side WebAssembly

Designing and deploying server-side WebAssembly components well, with runnable examples in Rust and Go against one WIT contract, running on wasmtime and wasmCloud and deployed to Kubernetes on minikube and OpenShift Local.

Site

  • Outline
  • Bibliography

Reference

  • Component Model ↗
  • WASI ↗
  • wasmtime ↗
  • View on GitHub ↗
  • Issues ↗
Open source · MIT Last built 2026-11-11