Crate wasmtime_wasi

Source
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 preview1 module documentation.

Re-exports§

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§

p2
Wasmtime’s WASIp2 Implementation
preview0preview1
Bindings for WASIp0 aka Preview 0 aka wasi_unstable.
preview1preview1
Bindings for WASIp1 aka Preview 1 aka wasi_snapshot_preview1.
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 function in_tokio used throughout the shim implementations of synchronous component binding Host traits in terms of the async ones.

Structs§

Deterministic
Implement insecure-random using a deterministic cycle of bytes.
DirPerms
Permission bits for operating on a directory.
FilePerms
I32Exit
An error returned from the proc_exit host syscall.
Network
OpenMode
TrappableError
A helper error type used by many other modules through type aliases.

Enums§

SocketAddrUse
The reason what a socket address is being used for.

Traits§

HostMonotonicClock
HostWallClock

Functions§

thread_rng