Crate wasmtime_wasi_io

Source
Expand description

§Wasmtime’s wasi-io Implementation

This crate provides a Wasmtime host implementation of the WASI 0.2 (aka WASIp2 aka Preview 2) wasi-io package. The host implementation is abstract: it is exposed as a set of traits which other crates provide impls of.

The wasi-io package is the foundation which defines how WASI programs interact with the scheduler. It provides the pollable, input-stream, and output-stream Component Model resources, which other packages (including wasi-filesystem, wasi-sockets, wasi-cli, and wasi-http) expose as the standard way to wait for readiness, and asynchronously read and write to streams.

This crate is designed to have no unnecessary dependencies and, in particular, to be #![no_std]. For an example no_std embedding, see /examples/min-platform at the root of the wasmtime repo.

Re-exports§

pub use async_trait::async_trait;
pub use ::bytes;

Modules§

bindings
poll
streams

Structs§

IoImpl
A small newtype wrapper which serves as the basis for implementations of Host WASI traits in this crate.

Traits§

IoView
A trait which provides access to the ResourceTable inside the embedder’s T of Store<T>.

Functions§

add_to_linker_async
Add the wasi-io host implementation from this crate into the linker provided.