Expand description
Wrapper around wasmtime-wasi that automatically detects the WASI version
used by the module.
§Example
let wat = r#"
(module
(type $empty (func))
;; In the real world this would be an actual wasi import,
;; but this crate only checks the module name.
(import "wasi_snapshot_preview1" "" (func (type $empty)))
)
"#;
let store = Store::default();
let ctx = WasiCtx::new(std::env::args())?;
let wasm = wat::parse_str(wat)?;
let wasi = AutoWasi::detect(&store, ctx, wasm)?;Enums§
- Auto
Wasi - An instantiated instance of the wasi exports.
- Wasi
Version - The version of WASI that a binary relies on.