Cette page est affichée en anglais. Une traduction française est en cours.
ScriptsJul 21, 2026·3 min de lecture

Fermyon Spin — Build and Run WebAssembly Microservices

Open-source framework for building, distributing, and running serverless applications as WebAssembly components with sub-millisecond cold starts.

Prêt pour agents

Installation avec revue préalable

Cet actif nécessite une revue. Le prompt copié demande un dry-run, affiche les écritures, puis continue seulement après confirmation.

Needs Confirmation · 64/100Policy : confirmer
Surface agent
Tout agent MCP/CLI
Type
Skill
Installation
Single
Confiance
Confiance : Established
Point d'entrée
Fermyon Spin Overview
Commande avec revue préalable
npx -y tokrepo@latest install 6c3f3b40-84e1-11f1-9bc6-00163e2b0d79 --target codex

Dry-run d'abord, confirmez les écritures, puis lancez cette commande.

Introduction

Spin is an open-source framework by Fermyon for building and running event-driven microservice applications using WebAssembly (Wasm) components. It delivers sub-millisecond cold starts, strong sandboxing, and polyglot development — you can write components in Rust, Go, Python, JavaScript, or any language that compiles to Wasm.

What Spin Does

  • Compiles application code into WebAssembly components and runs them in a secure sandbox
  • Handles HTTP triggers with sub-millisecond startup for serverless workloads
  • Supports multiple languages (Rust, Go, Python, TypeScript, C#) within the same application
  • Provides built-in key-value store, SQLite database, and outbound HTTP/Redis clients
  • Distributes apps as OCI artifacts, pushable to any container registry

Architecture Overview

Spin uses Wasmtime as its WebAssembly runtime, executing each request in an isolated Wasm component. The Spin runtime handles routing, triggers, and host-component interfaces. Applications are defined in a spin.toml manifest that declares components, triggers, and dependencies. The WASI (WebAssembly System Interface) provides controlled access to system resources like filesystem and networking.

Self-Hosting & Configuration

  • Install the Spin CLI from the official install script or Homebrew (brew install fermyon/tap/spin)
  • Define application components in spin.toml with trigger routes and build commands
  • Run locally with spin up or deploy to Fermyon Cloud, Kubernetes (via SpinKube), or any Wasm-capable host
  • Configure runtime options like listen address, TLS, and log level via CLI flags
  • Use spin registry push to publish apps as OCI artifacts to any container registry

Key Features

  • Sub-millisecond cold starts compared to seconds for traditional containers
  • Strong isolation through WebAssembly sandboxing without Linux namespace overhead
  • Built-in key-value store and SQLite for stateful applications without external dependencies
  • Component model support enabling mix-and-match of languages per route
  • Plugin system for extending the CLI with custom commands

Comparison with Similar Tools

  • Fastly Compute — Commercial Wasm platform; Spin is open-source and self-hostable
  • Cloudflare Workers — V8-based edge runtime; Spin uses Wasm for broader language support
  • wasmCloud — Actor-model Wasm framework; Spin is simpler with an HTTP-first approach
  • Docker/Containers — Heavier isolation; Spin offers faster startup and smaller footprint
  • AWS Lambda — Managed serverless; Spin runs anywhere with no cloud lock-in

FAQ

Q: Which languages does Spin support? A: Rust, Go, Python, TypeScript/JavaScript, and C#. Any language that compiles to WASI-compatible Wasm can work.

Q: Can I run Spin on Kubernetes? A: Yes. SpinKube integrates Spin with Kubernetes, letting you deploy Wasm workloads alongside containers.

Q: How does Spin handle state? A: Spin provides built-in key-value and SQLite stores. You can also connect to external databases via outbound HTTP or Redis.

Q: Is Spin production-ready? A: Spin is used in production by Fermyon Cloud customers and is backed by the Bytecode Alliance's Wasm standards.

Sources

Fil de discussion

Connectez-vous pour rejoindre la discussion.
Aucun commentaire pour l'instant. Soyez le premier à partager votre avis.

Actifs similaires