ArchitectureAdvanced

WASI 0.2 in Production: Wasmtime vs Spin vs wasmCloud

DeveloperHat Team
17 min read

TL;DR

WASI 0.2 and 0.3, Wasmtime, Spin, and wasmCloud compared: what each is for, how the Component Model changes deployment, and which to pick for plugins or edge.

The question for teams in late 2026 is no longer whether WebAssembly components work — it is which runtime to build on. Wasmtime, Spin, and wasmCloud all run the same WASI 0.2 components, and all three are built on the same engine, yet they solve different problems: Wasmtime is the embeddable runtime you put inside your own application, Spin is the framework for event-driven microservice apps made of components, and wasmCloud is the distributed platform for running components across a fleet of hosts.

The short version: adding sandboxed plugins to an existing application means embedding Wasmtime; building a new event-driven service means starting with Spin; operating a fleet of components that must find each other, scale, and redeploy without downtime means wasmCloud. Target WASI 0.2 for anything you ship today, and treat WASI 0.3, ratified on 11 June 2026, as the released next step.

One interface, any language, any runtime WIT is the contract; the component is the portable unit; the runtime is interchangeable. Rust component compiled to Wasm Python component compiled to Wasm JS component compiled to Wasm WIT interface typed contract · canonical ABI Wasmtime embeddable runtime Spin app framework wasmCloud distributed platform The interface is written once in WIT; bindings are generated for each language and each runtime.

What the Component Model changes

Before the Component Model, a WebAssembly module was a sealed box: it could import and export functions, but only numbers crossed the boundary. Strings, records, and errors had to be serialised by hand into linear memory, so every host and guest agreed on a private, ad-hoc calling convention, and two modules could not talk to each other without the host wiring them together.

The Component Model replaces that private convention with a public one. A component is a module plus a typed interface, written in WIT — the WebAssembly Interface Types language — that declares exactly what the component imports and exports, in terms of strings, records, variants, and resources. A Rust component, a Python component, and a JavaScript component can all implement the same interface and be swapped for one another without recompiling the host.

That swap-ability is what changes the architecture: the interface becomes the contract, and the component becomes the unit of deployment — a single portable binary, sandboxed by default, that runs on any runtime implementing the same WIT world. WASI — the WebAssembly System Interface — is the standard library of such worlds: filesystem, clocks, random, sockets, and HTTP, all expressed as WIT interfaces. A component gets no capability it was not explicitly granted, so a compromised plugin cannot reach the network or the filesystem unless the host allowed it.

WASI 0.2 vs WASI 0.3: where the standard stands

WASI 0.2, also called Preview 2, launched on 25 January 2024, rebuilding WASI on the Component Model with WIT interfaces. It defined two worlds most components still target: wasi:cli, for programs that run and exit, and wasi:http, the proxy world for services that answer HTTP requests. Since launch it has moved on a patch train from 0.2.1 through 0.2.12, the last arriving in June 2026, and it is now labelled "Stable, superseded by 0.3."

WASI 0.3.0 was ratified on 11 June 2026, and its headline change is that async is now native to WebAssembly Components. In 0.2, asynchronous work was faked with polling, callbacks, and host-side workarounds. In 0.3, stream and future are first-class types and async functions are first-class in the canonical ABI, so a component can await an HTTP response or a read from a stream the way code in any modern language does. The host manages a single shared event loop, which removes a whole class of bugs where guest and host each ran their own scheduler.

The rest of 0.3 is cleanup that follows from that change. wasi:io is removed — its stream and poll types are absorbed into the component model itself. wasi:http is reorganised into service and middleware worlds, and the middleware world replaces 0.2's proxy world, enabling service chaining: one component can sit in front of another, inspect or transform a request, and pass it on. Two patch releases followed quickly: 0.3.1 shipped in August 2026 and 0.3.2 in October 2026. No date has been set for WASI 1.0, and the Component Model 1.0 itself has not been released as of late November 2026.

The practical guidance follows from that status. WASI 0.2 is the safe default: every component-capable runtime supports it, every binding generator targets it, and a component written against it runs everywhere. WASI 0.3 is released, not experimental, but toolchain and platform support is still filling in, and a component that depends on 0.3 async narrows the set of places it can run today. If you are shipping this quarter, build on 0.2 and keep your interfaces narrow enough that moving to 0.3 later is a recompile, not a redesign.

Wasmtime: the embeddable runtime

Wasmtime is the Bytecode Alliance's embeddable WebAssembly runtime, and it is the foundation the other two options stand on — the engine inside both Spin and wasmCloud. Version 51.0.0 was released on 20 November 2026. It compiles WebAssembly with Cranelift and offers just-in-time compilation and ahead-of-time pre-compilation through wasmtime compile. It is the reference implementation for the Component Model and WASI, so new specification features tend to land in Wasmtime first: Wasmtime 46 was first to ship final WASI 0.3.0 with component-model async enabled by default.

Wasmtime is a library and a command-line tool, not a platform. You embed it in your own application — a Rust, C, Python, or .NET host process — and it runs components for you, enforcing the capability sandbox. Choose it when you already have an application and you want to add sandboxed, hot-swappable plugins to it. Guest bindings come from wit-bindgen, which generates the glue code from a WIT interface for Rust, Python, JavaScript, C#, and C, with Go supported through componentize-go.

A WIT interface is the contract everything else hangs on. Here is a minimal one — a greeter component that takes a name and returns a greeting — in the form you would actually write:

package example:greeter;

interface greet {
  hello: func(name: string) -> string;
}

world greeter {
  export greet;
}

From that file, wit-bindgen generates guest and host bindings, and the component model guarantees the two sides agree. The interface is written first, in a language-neutral form, and both sides are generated from it, so the contract cannot drift the way a hand-written FFI binding can.

Wasmtime is for you when the application already exists and the plugin model is the missing piece: a database running user-defined functions, a SaaS product customers extend, a game engine with mods, a CLI that loads extensions. It is not for you when you need routing, deployment, scaling, or multi-host orchestration — Wasmtime runs components, and everything around running them is your code.

Spin: the app framework

Spin is Fermyon's framework for building event-driven microservice applications out of WebAssembly components. Version 4.3.0 was published on 5 November 2026, following version 4.0 in April 2026, and it is an open-source CNCF sandbox project built on Wasmtime and the Component Model. Where Wasmtime gives you an engine, Spin gives you an application: a manifest, triggers, routing, and a deployment story. The Spin documentation is the primary reference for the manifest format and the triggers below.

An application is one or more Wasm components plus a spin.toml manifest declaring routing, triggers, build steps, variables, and allowed capabilities. The manifest is the security boundary as much as the configuration: components are stateless and sandboxed, and anything beyond pure computation must be declared — files, outbound hosts, variables, key-value storage, and databases (SQLite, PostgreSQL, MySQL, Redis). Spin ships a built-in HTTP trigger and a Redis pub/sub trigger, so the two most common shapes — a request-answering service and a message-driven worker — work out of the box, and SDKs exist for Rust, TypeScript and JavaScript, Python, Go through TinyGo, and .NET.

spin_manifest_version = 2

[application]
name = "greeter"
version = "0.1.0"

[[trigger.http]]
route = "/hello"
component = "greeter"

[component.greeter]
source = "target/wasm32-wasip2/release/greeter.wasm"
allowed_outbound_hosts = ["https://api.example.com"]

That manifest is the whole deployment unit: the route, the component, and the one outbound host it may call. The framework's documentation claims "millisecond cold start times" for components — no number is given, and none should be invented. There is, as of late November 2026, no credible head-to-head cold-start benchmark comparing Spin, Wasmtime, and wasmCloud. Measure before you choose on performance; choose on the shape of the system instead.

Version 4.3.0 bundles Wasmtime 50.0.1 and the WASI 0.3.2 WITs, adds spin registry pull --prepare and spin up --from-prepared, and adds middleware composition — the 0.3-style chaining of components in front of one another. For deployment, spin up runs an application locally, and the same application can be self-hosted or run on Kubernetes through SpinKube (SpinApp custom resource, containerd shim, RuntimeClass handler "spin"). Hosted options are Fermyon Cloud, via spin deploy, or Akamai Functions. Akamai acquired Fermyon on 1 December 2025 and has said it will continue to support Spin and SpinKube.

Spin is for you when you are building a new service and you want the framework to own the boring parts: routing, triggers, configuration, and the capability manifest. It is at its best for APIs, webhooks, and event-driven workers. It is not a distributed platform: it does not cluster hosts, reconcile desired state across a fleet, or give you a lattice for components to discover each other.

wasmCloud: the distributed platform

wasmCloud is, in its own description, "a universal application platform" for writing code in your language of choice, compiling it into a WebAssembly component, and running it anywhere. Version 2.12.3 was released on 21 November 2026, three days after the 2.12.2 patch. It is a CNCF project, and its positioning line is the clearest statement of its ambition: "wasmCloud is to WebAssembly components as Kubernetes is to containers." That is a claim about scope, not a benchmark — wasmCloud is the platform layer, the thing that runs components across machines. The wasmCloud documentation is the primary reference for the architecture below.

The architecture has three parts. Components are the portable, stateless Wasm logic — your code, compiled to a component. Providers are longer-lived host plugins that supply capabilities, such as key-value storage, messaging, or database access. Hosts run both, built on Wasmtime plus security and observability, and the hosts cluster on a lattice: in wasmCloud's words, "a self-forming, self-healing mesh network" built using NATS. Components and providers communicate through WIT interfaces.

The capability-provider model changed shape in the 2.x line: providers are now host component plugins — Wasm components themselves — rather than separate native binaries. Version 2.6 introduced them, 2.7 made the communication bidirectional, and 2.12.2 lets a plugin mount host directories.

The wash CLI is the front door — wash up starts NATS, the deployment manager, and a host on your machine — and wadm, the wasmCloud Application Deployment Manager, is the declarative core: OAM-based, it watches desired state and reconciles it by reacting to CloudEvents, so a deployment is a declaration of what should be running, not a sequence of commands. The 2.x operator model adds Kubernetes custom resources — Workload, WorkloadDeployment, WorkloadReplicaSet, WorkloadDaemonSet, and Host — with horizontal autoscaling, including KEDA, through a /scale subresource since 2.4.0. Recent releases show where the project's attention is: WASI 0.3 on by default since 2.5.0 (July 2026), policy enforced by default since 2.11.0, OpenTelemetry tracing over OTLP, a host memory guard since 2.12.2, and Sigstore-signed release tags since 2.12.0. Version 2.12.3 runs Wasmtime 48.0.10 — a few releases behind the Wasmtime 50.0.1 that Spin 4.3.0 embeds, which is normal for a platform that validates an engine version before adopting it.

wasmCloud is for you when the problem is operating a fleet: many components, many hosts, declarative deploys, autoscaling, and the lattice letting components find each other without hard-coded addresses. It is not for you when the system is one service on one host — the lattice, the deployment manager, and the operator are real operational load.

The tooling: wit-bindgen, wasm-tools, wac, and wkg

Whichever runtime you pick, the same four tools sit underneath it, and they are worth learning before the runtime, because they are where components are actually built. wit-bindgen generates guest and host bindings from WIT interfaces — version 0.63.0 arrived on 14 October 2026 — covering Rust, C, C#, Go, Python, JavaScript, and more. wasm-tools, version 1.263.0 from 30 October 2026, covers creating components, printing and parsing WIT, and validating that a component is well-formed. wac, WebAssembly Composition, version 0.12.0 from 30 September 2026, composes components — wac plug wires one component's imports to another's exports. And wkg, from the Bytecode Alliance's wasm-pkg-tools project, fetches and publishes WIT packages and components through OCI registries.

The daily workflow ties them together in a short pipeline:

wit-bindgen rust --out-dir bindings wit/greeter.wit
wasm-tools component new greeter.wasm -o greeter.component.wasm
wasm-tools validate greeter.component.wasm

Generate the bindings, build the component, validate it — and validate it every time, because a component that fails validation fails at deploy time in every runtime. Once an application has more than one component, plug them together with wac and validate the composed result.

The stack, layered like a platform Each layer only talks to the one below it, through a typed interface. Components — your logic, any language Rust · Python · JavaScript · Go · .NET — one portable binary each WIT interfaces + canonical ABI — the contract wasi:cli · wasi:http · your own worlds — capability-gated by default Runtimes + hosts — Wasmtime · Spin · wasmCloud sandbox · triggers · lattice — the platform layer underneath Swap any layer without rewriting the one above it — that is the whole point.

Head-to-head: which to pick for plugins, microservices, and edge

The three runtimes share an engine and a component format, so the comparison is about the shape of the system each one assumes, not speed.

WasmtimeSpinwasmCloud
What it isEmbeddable runtimeApp frameworkDistributed platform
You runYour applicationA Spin applicationA lattice of hosts
Unit of deployA component inside your appComponents plus spin.tomlComponents plus providers, declared in wadm
ScalingYour codeSpinKube on KubernetesHosts, CRDs, HPA and KEDA
Best forPlugins in an existing appNew event-driven servicesFleets of components

A plugin system lives inside an application that already has users, data, and a deployment story; what it needs is a sandbox and a typed interface, which is exactly what embedding Wasmtime provides, with no new platform to operate.

For microservices, the choice is Spin for a new service and wasmCloud once the services become a fleet. A single event-driven service — an API, a webhook handler, a worker consuming a queue — is Spin's home territory: the manifest declares everything and the deployment is one command or one SpinApp resource. Once the system is many services with shared capabilities, rolling deploys, and autoscaling rules, the framework stops being enough and the platform starts earning its keep.

For edge, the answer depends on whose edge it is. If the edge is your own application running close to users — the shape covered in our WebAssembly at the edge guide — the component model fits because the artifact is small, portable, and sandboxed, and the runtime choice follows the same logic as above: embed Wasmtime, or run Spin where a framework helps. If the edge is a fleet of locations running shared components, wasmCloud's lattice is the shape that was built for it. Readers weighing serverless cold starts should also read our AWS Lambda cold starts in 2026 analysis — the comparison that matters is components versus the serverless platforms teams already run — and our serverless platforms beyond Lambda guide.

On performance, the honest thing: no credible head-to-head cold-start benchmark of the three runtimes exists, so do not choose between them on a number someone quoted you. The usable data points are narrower. A bittide CPU benchmark from June 2026 (libsodium cryptography) found Wasmtime 46.0.0 running at 2.41 times native, improving from 2.67 times in 2024 — but that is CPU-bound throughput for one engine, not a cross-runtime comparison or a cold-start measurement. wasmCloud's own internal benchmark, published with the 2.12.2 release, reported on a c9g.16xlarge instance with 300,000 warm workloads that an allocator change raised start throughput by roughly 45 percent, from about 33,600 to between 48,300 and 50,000 starts per second — a vendor-internal measurement, not a cross-runtime comparison. Measure it yourself, with your components, on your hosts, before performance enters the decision.

Recommendation

Start with Spin for a new service, embed Wasmtime for plugins in an existing application, and adopt wasmCloud when you can name the fleet it will manage. Target WASI 0.2 today, prototype on WASI 0.3 in parallel, and keep your WIT interfaces narrow so the move is a recompile.

Which runtime, in 30 seconds Answer one question: what are you building? What are you building? plugins · service · fleet Plugins → Wasmtime embed the engine New service → Spin framework + manifest Fleet → wasmCloud lattice + wadm Whatever you pick, target WASI 0.2 today and prototype on WASI 0.3 in parallel.

Architecture Decision

>

Decision: Build new event-driven services on Spin 4.3.0, embed Wasmtime 51.0.0 for plugins in existing applications, and adopt wasmCloud 2.12.3 only once the system is a fleet. Target WASI 0.2 for shipping code; prototype on WASI 0.3.

>

Context: WASI 0.3.0 was ratified on 11 June 2026, and all three runtimes run the same components — but they assume different system shapes, and the standard is still moving toward 1.0.

>

Options considered: Embedding Wasmtime for everything; building every service on Spin; adopting wasmCloud as the default; waiting for WASI 1.0 and the Component Model 1.0 before building anything.

>

Why this one: Each runtime is used where its shape fits — an engine for plugins, a framework for services, a platform for fleets — so no layer is built twice. WASI 0.2 is the version every runtime supports today, and 0.3 is prototyped now so the async model shapes interfaces early.

>

What it costs you: Two runtimes to learn instead of one if you need both plugins and services; a migration from WASI 0.2 to 0.3 later, though narrow interfaces keep it small; and a second platform decision when Spin applications grow into a fleet.

>

When to reverse it: Reverse toward wasmCloud as the default when the fleet — many components, many hosts, shared capabilities, rolling deploys — is the normal case rather than the exception. Reverse toward Wasmtime-only when the "services" turn out to be plugins inside one application after all. Reverse the WASI 0.2 default when the runtimes you actually deploy all support 0.3 and your interfaces need async.

When not to use

Do not reach for the Component Model at all when the system is a single service with no plugin story and no fleet in its future — a plain container or a serverless function is less to operate, better tooled, and easier to hire for. Do not adopt wasmCloud for one service on one host, and do not embed Wasmtime when a well-understood plugin mechanism already exists in your stack and your plugins are already trusted code. Do not build on WASI 0.3 for a shipping product until the runtimes you deploy support it. And do not choose between these runtimes on performance claims: no credible head-to-head cold-start benchmark exists.

How long this guidance stays current

This article is current as of 29 November 2026, and the facts that will age it are named in the text: Wasmtime 51.0.0, Spin 4.3.0, wasmCloud 2.12.3, WASI 0.3.2 (October 2026), and the tooling versions from September and October 2026. Re-check when a WASI 0.3.3 or later patch changes the async model, when the Component Model reaches 1.0, or when Spin or wasmCloud adopts a newer Wasmtime engine — the Wasmtime version each platform embeds is the practical marker of which WASI version it really supports. The decision itself should hold until the Component Model reaches 1.0 and WASI sets a date for 1.0; when either happens, the "prototype on 0.3" advice becomes "ship on the new stable version," and the rest — engine for plugins, framework for services, platform for fleets — should survive unchanged.

Why This Matters

Understanding the business and technical context helps you make informed decisions rather than blindly following patterns.

Trade-offs to Consider

Every architectural decision involves trade-offs. Consider your specific requirements, team expertise, and scale when evaluating options.

When NOT to Use This

Knowing when a solution doesn't apply is as valuable as knowing when it does. Consider alternatives for your specific situation.

Decision Framework

Use this framework to evaluate whether this approach is right for your use case based on your specific constraints and requirements.

Share this articleShare on XShare on LinkedIn

Keep the decision frameworks coming

One practical architecture guide a week — patterns, trade-offs, and when not to use them. No spam, unsubscribe anytime.