Technology · Ebook
Spin: Serverless WebAssembly Applications
by Shriira Press
Spin is an open-source CNCF framework, created at Fermyon, for building and running event-driven serverless applications compiled to WebAssembly. Instead of keeping containers warm, you write small components, declare in one spin.toml manifest which events invoke them, and run with cold starts measured in milliseconds. This book follows that idea from the ground up: the cold-start problem that motivates it, the WebAssembly foundations of WASI and the Component Model, the manifest, components and triggers, writing apps in Rust, Go, JavaScript, and Python, the built-in key-value and SQLite stores, the spin CLI workflow, and packaging applications as OCI artifacts to run on Kubernetes with SpinKube. A closing chapter weighs best practices, trade-offs, and where Spin fits.
Contents
- 1Preface
- 2Chapter 1 — The Cold-Start Problem
- 3Chapter 2 — WebAssembly, WASI, and the Component Model
- 4Chapter 3 — The Application Manifest
- 5Chapter 4 — Components and Triggers
- 6Chapter 5 — Writing Apps Across Languages
- 7Chapter 6 — Built-in Storage and Services
- 8Chapter 7 — The Spin CLI and Development Workflow
- 9Chapter 8 — Packaging and Running on Kubernetes
- 10Chapter 9 — Spin in Practice
