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§
- Exit
Code - This is returned in
RuntimeError. Usedowncastordowncast_refto retrieve theExitCode.
Enums§
- Wasi
Version - The version of WASI. This is determined by the imports namespace string.
Functions§
- generate_
import_ object - Creates a Wasi
ImportObjectwithWasiStatewith the latest snapshot of WASI. - generate_
import_ object_ for_ version - Creates a Wasi
ImportObjectwithWasiStatefor the givenWasiVersion. - generate_
import_ object_ from_ state - Create an
ImportObjectwith an existingWasiState.WasiStatecan be constructed from aWasiStateBuilder. - 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_versionto find out which version of WASI the module is.