Expand description
§Wasmtime’s WASI Implementation
This crate provides a Wasmtime host implementations of different versions of WASI.
WASI is implemented with the Rust crates [tokio] and cap-std primarily, meaning that
operations are implemented in terms of their native platform equivalents by
default.
For components and WASIp2, see p2.
For WASIp1 and core modules, see the p1 module documentation.
For WASIp3, see p3. WASIp3 support is experimental, unstable and incomplete.
Re-exports§
pub use self::clocks::HostMonotonicClock;pub use self::clocks::HostWallClock;pub use self::filesystem::DirPerms;pub use self::filesystem::FilePerms;pub use self::filesystem::OpenMode;pub use self::random::Deterministic;pub use self::random::thread_rng;pub use async_trait::async_trait;pub use cap_fs_ext::SystemTimeSpec;pub use cap_rand::RngCore;pub use wasmtime::component::ResourceTable;pub use wasmtime::component::ResourceTableError;
Modules§
- cli
- clocks
- filesystem
- p0
p1 - Bindings for WASIp0 aka Preview 0 aka
wasi_unstable. - p1
p1 - Bindings for WASIp1 aka Preview 1 aka
wasi_snapshot_preview1. - p2
- Wasmtime’s WASIp2 Implementation
- p3
p3 - Experimental, unstable and incomplete implementation of wasip3 version of WASI.
- random
- runtime
- This module provides an “ambient Tokio runtime”
with_ambient_tokio_runtime. Embedders of wasmtime-wasi may do so from synchronous Rust, and not use tokio directly. The implementation of wasmtime-wasi requires a tokio executor in a way that is deeply tied to its design. When used from a synchronous wasmtime context, this module provides the wrapper functionin_tokioused throughout the shim implementations of synchronous component bindingHosttraits in terms of the async ones. - sockets
Structs§
- I32Exit
- An error returned from the
proc_exithost syscall. - Trappable
Error - A helper error type used by many other modules through type aliases.
- WasiCtx
- Per-
Storestate which holds state necessary to implement WASI from this crate. - Wasi
CtxBuilder - Builder-style structure used to create a
WasiCtx. - Wasi
CtxView - Structure returned from
WasiView::ctxwhich provides access to WASI state for host functions to be implemented with.