Run

Host a WASI HTTP component

Serve standard component handlers with explicit ports, storage, and outbound access.

Start a local service

Provide a component exporting the standard WASI HTTP incoming handler. Each request receives its own Store, WASI context, fuel, and deadline. The following example assumes http-component.wasm is already built.

wasmd run -p 127.0.0.1:8080:8080 -v app-data:/data ./http-component.wasm

Understand ports and volumes

-p accepts [HOST_IP:]HOST_PORT:GUEST_PORT; one TCP mapping is supported. The guest port is a mapping identifier for the handler, not a guest socket. Named volumes persist under the Wasmd configuration directory. Use an explicit volume name to share data between versions.

wasmd volume create app-data
wasmd volume inspect app-data

Grant outbound HTTP

Outbound access is denied by default. Add --allow-http for each exact HTTP(S) authority required by the component. Request and response bodies, headers, and timeouts remain bounded.

wasmd run -p 127.0.0.1:8080:8080 ./http-component.wasm --allow-http api.example.com

Control service admission

The fresh lifecycle is the default. pool and snapshot are explicit options, with bounded workers and queue capacity. Exhausted queue or instance budgets return 503. Snapshot initialization applies only to eligible Core modules; other component modules use pooled initialization.

Keep the source in view

Based on the current repository documentation. Check your installed version and the linked acceptance records when adopting development features.

Read the Wasmd source document ↗
Explore all documentation →