Crate wasmer_wasi_fl

Crate wasmer_wasi_fl 

Source
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§

state
WARNING: the API exposed here is unstable and very experimental. Certain things are not ready yet and may be broken in patch releases. If you’re using this and have any specific needs, please let us know here https://github.com/wasmerio/wasmer/issues/583 or by filing an issue.
types

Structs§

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

Enums§

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

Functions§

generate_import_object
Creates a Wasi ImportObject with WasiState with the latest snapshot of WASI.
generate_import_object_for_version
Creates a Wasi ImportObject with WasiState for the given WasiVersion.
generate_import_object_from_state
Create an ImportObject with an existing WasiState. WasiState can be constructed from a WasiStateBuilder.
get_wasi_version
Detect the version of WASI being used based on the import namespaces.
is_wasi_module
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.