⚡ API Patterns and Practices: Server-Side WebAssembly
Home Chapters Examples Diagrams Bibliography GitHub ↗
Home / Interfaces: HTTP & gRPC
Part 3 3 chapters

Interfaces: HTTP & gRPC

Serve HTTP and gRPC directly from a component, and handle the networking, reconnect, and resilience concerns a sandboxed component faces differently than a conventional service.

Chapter 11

HTTP from a Component

Serve HTTP from a WebAssembly component with the wasi-http proxy world, compose it with the cargo provider via wac plug, and run it under wasmtime serve in Rust and Go.

14 min readRead →
Chapter 12

gRPC with Wasm

Protobuf runs inside a Wasm component, gRPC transport does not: encode and decode in the sandbox, and terminate gRPC in a native bridge in front of the unchanged provider.

20 min readRead →
Chapter 13

Networking, Reconnect, and Resilience

Outbound TCP from a component through wasi:sockets, the host grant that decides whether a connect can happen at all, and the reconnect loop with exponential backoff and jitter.

14 min readRead →
← Previous part Building Components in Rust & Go Next part → Runtimes: wasmtime & wasmCloud

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