A crate to use the reference WASI implementation in WebAssembly modules run with Lucet.
wasi_common_lucet::export_wasi_funcs()
once in order to have the symbols exportedWasiCtx::new()
. Note that the function signature slightly differs from the lucet-wasi
one.insert_embed_ctx()
.```rust use wasicommonlucet::WasiCtx;
fn doit() -> Result <(), Error> { wasicommonlucet::exportwasifuncs(); // ... let mut lucetinstancehandle = lucetdylib.instantiate(region)?; let wasictx: WasiCtx = WasiCtx::new(["app"].iter())?; lucetinstancehandle.insertembedctx(wasi_ctx); // ... } ```