13 unstable releases (3 breaking)

✓ Uses Rust 2018 edition

0.4.2 Feb 6, 2020
0.4.1 Jan 24, 2020
0.3.0 Nov 1, 2019
0.2.0 Oct 31, 2019
0.1.4 Sep 5, 2019

#288 in WebAssembly

Download history 27/week @ 2020-02-28 26/week @ 2020-03-06 15/week @ 2020-03-13 39/week @ 2020-03-20 13/week @ 2020-03-27 5/week @ 2020-04-03 91/week @ 2020-04-10 13/week @ 2020-04-17 3/week @ 2020-04-24 2/week @ 2020-05-01 1/week @ 2020-05-08 79/week @ 2020-05-15 13/week @ 2020-05-22 26/week @ 2020-05-29 13/week @ 2020-06-05 15/week @ 2020-06-12

113 downloads per month

ISC license

21KB
592 lines

crates.io Released API docs

WASI-common wrappers for Lucet

A crate to use the reference WASI implementation in WebAssembly modules run with Lucet.

  • Call wasi_common_lucet::export_wasi_funcs() once in order to have the symbols exported
  • Create a new isntance with WasiCtx::new(). Note that the function signature slightly differs from the lucet-wasi one.
  • Register it into Lucet instances using insert_embed_ctx().
use wasi_common_lucet::WasiCtx;

fn doit() -> Result <(), Error> {
    wasi_common_lucet::export_wasi_funcs();
    // ...
    let mut lucet_instance_handle = lucet_dylib.instantiate(region)?;
    let wasi_ctx: WasiCtx = WasiCtx::new(["app"].iter())?;
    lucet_instance_handle.insert_embed_ctx(wasi_ctx);
    // ...
}

Dependencies

~9.5MB
~185K SLoC