---
title: "Host Plugins — Extend wasmCloud Hosts | wasmCloud"
description: "Host plugins extend wasmCloud hosts with additional capabilities — bring custom WASI implementations and integrations into your WebAssembly runtime as native Rust plugins or as WebAssembly components."
canonical: "https://wasmcloud.com/docs/overview/hosts/plugins/"
---

Version: v2

# Plugins

### Host plugins extend hosts with additional capabilities.

Plugins provide capabilities at the host level, extending a wasmCloud host with specific implementations of [interfaces](https://wasmcloud.com/docs/overview/interfaces/). Each plugin implements a **WIT world**—a collection of imports and exports that are directly linked to workloads at runtime.

> **Discussed on the community call**
>
> Bailey Hayes explained when a capability fits a host component plugin running at host tenancy and when it needs a native host plugin, on the [July 15, 2026 wasmCloud community call](https://wasmcloud.com/community/2026-07-15-community-meeting/). Read the [transcript](https://wasmcloud.com/community/2026-07-15-community-meeting-transcript/) or [watch the discussion from 15:47](https://youtu.be/Kwg0mEP_mJQ?t=947).

Plugins allow you to customize how your host handles common operations like HTTP requests, key-value storage, configuration, and logging. You can use the built-in plugins provided by `wash-runtime`, or implement custom plugins for specialized requirements.

wasmCloud supports two kinds of host plugin:

- **[Native host plugins](https://wasmcloud.com/docs/overview/hosts/plugins/#native-host-plugins)** — Rust code linked into the host binary that implements the `HostPlugin` trait. Native host plugins are appropriate for capabilities that need direct host resources (filesystem, network, hardware) or must run with the host's privileges.
- **[Host component plugins](https://wasmcloud.com/docs/overview/hosts/plugins/#host-component-plugins)** — WebAssembly components deployed alongside workloads, running as [trigger services](https://wasmcloud.com/docs/overview/hosts/trigger-services/) with a capability ingress. Host component plugins are useful when a capability can be implemented in Wasm and you want to ship, version, and sandbox it like any other component.

Both kinds of plugin provide interfaces to workloads, and a workload does not know whether a given capability is implemented natively or as a component. Host component plugins can also *consume* interfaces that workloads export — see below.

## Native host plugins

Native host plugins are Rust implementations of the `HostPlugin` trait, linked into the host binary at compile time. They run with the host's privileges and can bridge to any resource the host process has access to.

### Built-in plugins

The [`wash-runtime`](https://github.com/wasmCloud/wasmCloud/tree/main/crates/wash-runtime) crate includes built-in plugins for common WASI interfaces. Several of these plugins come in two variants, in-memory implementations for local development (used by `wash dev`) and NATS-backed implementations for production, while `wasmcloud:nats`, `wasmcloud:postgres`, and `wasmcloud:secrets` have a single implementation.

| Plugin | Interface | Description |
| --- | --- | --- |
| **Key-Value** | `wasi:keyvalue` | Key-value storage operations |
| **Blobstore** | `wasi:blobstore` | Blob/object storage operations |
| **Config** | `wasi:config` | Runtime configuration access |
| **Logging** | `wasi:logging` | Structured logging output |
| **OpenTelemetry** | `wasi:otel` | Traces, metrics, and logs export |
| **Messaging** | `wasmcloud:messaging` | Message passing and pub/sub communication |
| **NATS** | `wasmcloud:nats` | NATS-native core pub/sub, JetStream, and key-value, with per-workload connections and deny-by-default grants (since 2.9.0) |
| **Postgres** | `wasmcloud:postgres` | Direct PostgreSQL access: queries and prepared statements |
| **Secrets** | `wasmcloud:secrets` | Secrets delivery from deploy-time configuration |

> **Note**
>
> HTTP is handled by the `Ingress` server (named `HttpServer` before wasmCloud 2.6.1), which implements the `HostHandler` trait and is registered separately via `with_http_handler()` rather than `with_plugin()`. In addition, all [WASI P2 interfaces](https://docs.wasmtime.dev/api/wasmtime_wasi/p2/index.html#wasip2-interfaces) provided by `wasmtime-wasi`—including `wasi:filesystem`, `wasi:clocks`, `wasi:random`, `wasi:io`, `wasi:sockets`, and the `wasi:cli` suite—are built into the host core and always available without registration.

Messaging and the secrets plugin are always available. The remaining plugins are controlled by Cargo feature flags when building your host; the ones above are all in the default feature set, so to trim the set, disable default features and re-enable only what you need (note that the defaults also include features like `washlet`, `wasi-otel`, `wasmcloud-postgres`, and `wasmcloud-nats`, which this drops too). Build against the Git repository — the `wash-runtime` crate on crates.io is a stale early snapshot that predates the current API:

toml

```toml
[dependencies]
wash-runtime = { git = "https://github.com/wasmCloud/wasmCloud", tag = "v2.13.0", default-features = false, features = ["wasi-keyvalue", "wasi-config", "wasi-logging", "wasi-blobstore"] }
```

### Registering plugins with the host

Native plugins are registered with the host using the `HostBuilder` API. HTTP is handled separately via `with_http_handler()` because the `Ingress` server implements the `HostHandler` trait rather than `HostPlugin`:

rust

```rust
let host = HostBuilder::new()
    .with_engine(engine)
    .with_http_handler(Arc::new(http_handler))
    .with_plugin(Arc::new(config_plugin))?
    .build()?;
```

See the [runtime overview](https://wasmcloud.com/docs/runtime/#usage) for a full working example including engine setup and workload start.

> **Default behavior**
>
> If a handler is not provided for a particular capability, a "deny all" implementation is used. This ensures that components cannot access capabilities unless explicitly configured.

### Custom native plugins

You can create custom native plugins by implementing the `HostPlugin` trait. See [Creating Host Plugins](https://wasmcloud.com/docs/runtime/creating-host-plugins/) for more information.

Custom native plugins are useful when you need to:

- **Integrate with proprietary systems**: Connect components to internal APIs, databases, or services that don't have standard WASI interfaces.
- **Add security layers**: Implement custom authentication, authorization, or audit logging for capability access.
- **Provide specialized hardware access**: Expose GPUs or other specialized hardware to components.

## Host component plugins

A **host component plugin** is a WebAssembly component that provides a host capability to workloads. Instead of linking a Rust `HostPlugin` implementation into the host binary, you build the capability as a Wasm component, declare it in host configuration, and the host loads it at startup, without requiring a host rebuild.

Host component plugins run as [trigger services](https://wasmcloud.com/docs/overview/hosts/trigger-services/) with a **capability ingress**: a single long-lived plugin instance is pinned in the host, and other workloads' capability calls (for example, a `wasmcloud:messaging/consumer.publish` invocation) are dispatched to that pinned instance across a store boundary. See [Trigger services](https://wasmcloud.com/docs/overview/hosts/trigger-services/#capability-ingress) for the cross-store dispatch model.

Calls can also flow the other way: a plugin can import interfaces that workloads export and invoke them through `wasmcloud:host/workload-call` — dispatching scheduled or broker-driven work into application components. A plugin can even export no capability at all and act purely as a **trigger** driving workload exports from its background task. Plugins can also import the host's built-in native capabilities (`wasi:config`, `wasi:keyvalue`, `wasmcloud:secrets`, and more) for their own use, with their own configuration and secrets and allowlist-gated network egress (covering raw sockets as well as HTTP and DNS since 2.10.0).

### When to use host component plugins

Host component plugins are suitable when:

- The capability can be implemented in Wasm (e.g., no direct OS-level access is required.)
- You want to ship, version, or sandbox the capability using the same primitives as any other component.
- You want to iterate on the capability independently of the host binary.

Native host plugins remain the right choice when the capability needs direct host resources (raw sockets, filesystem paths, hardware) or must run with host privileges outside the sandbox. See [Plugin or Service?](https://wasmcloud.com/docs/recipes/plugin-or-service/) for a full decision guide.

### The `wasmcloud:host` interface

Host component plugins can import [`wasmcloud:host`](https://wasmcloud.com/docs/overview/interfaces/) (0.1.4 since 2.9.0) to observe and cooperate with their runtime environment:

- **`wasmcloud:host/identity`**: query the workload and component identifiers of the caller currently invoking this plugin, and (since 2.9.0) `get-binding-name`, the label the current call arrived on when a component imports the plugin's interface under an `implements` label. This allows a plugin to partition state for each caller or binding (e.g., keep one connection or session per workload without callers seeing each other's state).
- **`wasmcloud:host/cancel`**: cooperative per-invocation cancellation. A handler can identify its current job, check whether it has been asked to stop, and observe cancellation signals for long-running work.
- **`wasmcloud:host/workload-call`**: invoke interfaces that workloads export, targeting either the current caller or an explicitly opened workload. Failures come back as error values — a failing workload can never fault the plugin.
- **`wasmcloud:host/workload-lifecycle`** (an interface the plugin *exports* rather than imports): observe workloads binding and unbinding, to set up and tear down per-workload state.

For details on authoring, packaging, and deploying a host component plugin, see [Creating host component plugins](https://wasmcloud.com/docs/runtime/creating-host-component-plugins/).

### Feature-gated

Host component plugin support is carried by the `host-component-plugins` Cargo feature, which is not in the default release image. Since 2.10.0 each release also publishes an **all-features image** that includes it: the release tag with an `-all-features` suffix (`ghcr.io/wasmcloud/wash:2.13.0-all-features`), multi-arch and retagged from the exact digest that passed release testing. On Kubernetes, point `runtime.image` or a single host group's `hostGroups[].image` at that tag. If you embed `wash-runtime`, enable the feature on a Git dependency (the crate on crates.io is a stale early snapshot that predates the current API):

toml

```toml
[dependencies]
wash-runtime = { git = "https://github.com/wasmCloud/wasmCloud", tag = "v2.13.0", features = ["host-component-plugins"] }
```

To build your own image instead, the source [Dockerfile](https://github.com/wasmCloud/wasmCloud/blob/main/Dockerfile) takes `CARGO_FEATURES=host-component-plugins` as a build arg; point the Helm chart at it via the `runtime.image` values (`registry`, `repository`, and [`tag`](https://wasmcloud.com/docs/kubernetes-operator/operator-manual/helm-values/#runtimeimagetag)).

## Plugin ids are reserved

Since 2.11.0 a host refuses to start a workload whose id matches a registered plugin id, with `Workload ID [<id>] is reserved by host plugin [<id>]`. A host binds a component plugin's own native imports as a synthetic workload named for the plugin, and native plugins key their per-workload state by workload id, so a collision let a workload share — and on stop destroy — a plugin's own configuration and secrets.

This does not affect Kubernetes users: the operator sends each workload's resource **UID** rather than its name, and a UID can never collide with a plugin id, so a `Workload` named `wasmcloud-nats` is still fine. `wash dev` generates a UUID too. The reservation matters for callers that choose their own workload ids: custom hosts built on `wash-runtime`, direct washlet and NATS API clients, and `wash` CLI invocations.

One caveat if you hit it on Kubernetes anyway through a custom path: the refusal message is not surfaced on the resource. It appears only in the host's log, as a warning keyed `refused to start workload`.

## Configuring plugins

Plugins of both kinds are declared in one block: `plugins` in host configuration (`host.plugins`, `dev.plugins`) or in Helm values under [`runtime.hostGroups[].plugins`](https://wasmcloud.com/docs/kubernetes-operator/operator-manual/helm-values/#runtimehostgroupsplugins) (since 2.9.0). Each entry names a plugin by `id` (with an `image` or `file` source for component plugins), carries its configuration and secrets, and can declare named `bindings` that components import under `implements` labels.

A `workloadConfig` policy decides what a workload manifest may set. Under `deny`, the default outside `wash dev`, connection addresses and credentials come only from the operator's declaration: a manifest that sets one or widens a grant ceiling is refused at deploy, and once any binding is declared for a plugin, so is a manifest naming a binding the declaration does not carry. `warn` allows while logging what `deny` would refuse.

See [Creating host component plugins](https://wasmcloud.com/docs/runtime/creating-host-component-plugins/#named-bindings) for the full entry shape, and the [`wasmcloud:nats` reference](https://wasmcloud.com/docs/kubernetes-operator/host-interface-configuration/#wasmcloudnats) for the key ownership model in practice.

## Keep reading

- Learn more about the [wasmCloud runtime](https://wasmcloud.com/docs/runtime/).
- Understand the [trigger-service execution model](https://wasmcloud.com/docs/overview/hosts/trigger-services/) that host component plugins run on.
- Choosing between a plugin and a service? See [Plugin or Service?](https://wasmcloud.com/docs/recipes/plugin-or-service/).
- Authoring a host component plugin? See [Creating host component plugins](https://wasmcloud.com/docs/runtime/creating-host-component-plugins/).
- Authoring a native host plugin? See [Creating Host Plugins](https://wasmcloud.com/docs/runtime/creating-host-plugins/).
- See the [wash-runtime source code](https://github.com/wasmCloud/wasmCloud/tree/main/crates/wash-runtime) for implementation details.
- Watch a [discussion of host plugin implementation](https://www.youtube.com/live/3DlUjl8gQVs?si=MbTz4MohjYDmE8fI&t=731) from a wasmCloud community call.

Last updated on **Nov 19, 2026** by **Liam Randall**
