| Crates.io | wasmi-plugin-hdk |
| lib.rs | wasmi-plugin-hdk |
| version | 0.1.0 |
| created_at | 2025-12-06 17:35:57.742125+00 |
| updated_at | 2025-12-06 17:35:57.742125+00 |
| description | Host development kit for the wasmi WebAssembly Interpreter |
| homepage | |
| repository | https://github.com/Robert-MacWha/wasmi-plugin-framework |
| max_upload_size | |
| id | 1970463 |
| size | 85,913 |
A plugin framework built on the Wasmi WebAssembly interpreter. The Wasmi Plugin Framework is designed to run wasm plugins across many architectures, including natively, on mobile, and web browsers (running guest wasm32-wasip1 instances within wasm32-unknown-unknown!).
Features
Limitations
The Wasmi Plugin Framework intentionally targets a subset of the wasm32-wasip1 spec to maximize compatibility across platforms. Because of this, some wasi syscalls are either not implemented or have limited functionality.
The following wasi syscalls are fully supported:
args_getargs_sizes_getenviron_getenviron_sizes_getrandom_getsched_yieldproc_raiseproc_exitThe following wasi syscalls are partially supported:
fd_read - only supports reading from stdin (fd 0)fd_write - only supports writing to stdout (fd 1) and stderr (fd 2)clock_time_get - supports CLOCKID_REALTIME and CLOCKID_MONOTONICpoll_oneoff - supports only clock subscriptionsThe remaining wasi syscalls are not supported. Because this framework is designed to run in wasm32-unknown-unknown environments (specifically web browsers), filesystem and network access would be mostly impossible anyways. If you need network or filesystem access for your plugin, consider implementing those features as host methods instead.
What this means:
Most of the time unless you're deliberately trying to use an unsupported feature (ie using filesystem access, trying to spawn a thread, making network requests, etc), your plugin will work just fine. If you do try to use an unsupported feature, the plugin will likely panic and return an error to the host.
graph TB
subgraph Host["Host Process (wasmi-hdk)"]
App["Your Application"]
Executor[WASM Executor]
HostMethods["Host Methods"]
end
subgraph Plugin["Guest Process (wasmi-pdk)"]
PluginMethods["Plugin Methods"]
Code["Your Plugin Code"]
end
App -->|call| Executor
Executor -->|via JSON-RPC| PluginMethods
PluginMethods --> Code
Code -->|via JSON-RPC| HostMethods
HostMethods --> Executor
See the host tests and test-plugin for example usage.