Expand description
This crate contains the binaries of three WebAssembly modules:
WASI_SNAPSHOT_PREVIEW1_REACTOR_ADAPTER
WASI_SNAPSHOT_PREVIEW1_COMMAND_ADAPTER
WASI_SNAPSHOT_PREVIEW1_PROXY_ADAPTER
These three modules bridge the wasip1 ABI to the wasip2 ABI of the component model.
They can be given to the wit_component::ComponentEncoder::adapter
method, using the WASI_SNAPSHOT_PREVIEW1_ADAPTER_NAME
, to translate a
module from the historical WASM ABI to the canonical ABI.
Constants§
- The name of the adapters in this crate, which may be provided to
wit_component::ComponentEncoder::adapter
. - The “command” adapter extends the “reactor” adapter and additionally exports a
run
function entrypoint. - The “proxy” adapter provides implements a HTTP proxy which is more restricted than the “reactor” adapter adapter, as it lacks filesystem, socket, environment, exit, and terminal support, but includes HTTP handlers for incoming and outgoing requests.
- The “reactor” adapter provides the default adaptation from preview1 to preview2.