Crate wasmer_wasi_asml_fork[][src]

Expand description

Wasmer’s WASI implementation

Use generate_import_object to create an ImportObject. This ImportObject can be combined with a module to create an Instance which can execute WASI Wasm functions.

See state for the experimental WASI FS API. Also see the WASI plugin example for an example of how to extend WASI using the WASI FS API.

Modules

Structs

For piping stdio. Stores all output / input in a byte-vector.

A wrapper type around Stderr that implements WasiFile and Serialize + Deserialize.

A wrapper type around Stdin that implements WasiFile and Serialize + Deserialize.

A wrapper type around Stdout that implements WasiFile and Serialize + Deserialize.

The environment provided to the WASI imports.

Warning, modifying these fields directly may cause invariants to break and should be considered unsafe. These fields may be made private in a future release

Top level data type containing all* the state with which WASI can interact.

Convenient builder API for configuring WASI via WasiState.

Enums

This is returned in RuntimeError. Use downcast or downcast_ref to retrieve the ExitCode.

Error type for external users

Error type returned when bad data is given to WasiStateBuilder.

The version of WASI. This is determined by the imports namespace string.

Constants

all the rights enabled

the fd value of the virtual root

Traits

This trait relies on your file closing when it goes out of scope via Drop

Functions

Create an ImportObject with an existing WasiEnv. WasiEnv needs a WasiState, that can be constructed from a WasiStateBuilder.

Detect the version of WASI being used based on the import namespaces.

Like get_wasi_version but detects multiple WASI versions in a single module. Thus strict behaves differently in this function as multiple versions are always supported. strict indicates whether non-WASI imports should trigger a failure or be ignored.

Check if a provided module is compiled for some version of WASI. Use get_wasi_version to find out which version of WASI the module is.