Expand description
Plugin system for extending host capabilities.
This module provides the plugin framework that allows the wasmcloud host to support different WASI interfaces and capabilities. Plugins implement specific functionality that components can use through standard interfaces.
§Plugin Architecture
Plugins are Rust types that implement the HostPlugin trait. They:
- Declare which WIT interfaces they provide via
HostPlugin::world - Bind to components that need their capabilities via [
HostPlugin::bind_component] - Can participate in workload lifecycle events
- Are automatically linked into the wasmtime runtime
§Built-in Plugins
The crate provides several built-in plugins for common WASI interfaces:
wasi_http- HTTP server capabilities (wasi:http/incoming-handler)wasi_config- Runtime configuration (wasi:config/runtime)wasi_blobstore- Object storage (wasi:blobstore)wasi_keyvalue- Key-value storage (wasi:keyvalue)wasi_logging- Structured logging (wasi:logging)
Modules§
- wasi_
blobstore - WASI Blobstore Memory Plugin
- wasi_
config - Runtime configuration plugin for WebAssembly components.
- wasi_
http - HTTP server plugin for handling incoming HTTP requests.
- wasi_
keyvalue - WASI KeyValue Memory Plugin
- wasi_
logging - Structured logging plugin for WebAssembly components.
Traits§
- Host
Plugin - The
HostPlugintrait provides an interface for implementing built-in plugins for the host. A plugin is primarily responsible for implementing a specificWitWorldas a collection of imports and exports that will be directly linked to the workload’swasmtime::component::Linker.