1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
use wasi_common::old::snapshot_0::hostcalls;
pub use wasi_common::old::snapshot_0::{WasiCtx, WasiCtxBuilder};

// Defines a `struct Wasi` with member fields and appropriate APIs for dealing
// with all the various WASI exports.
wig::define_wasi_struct!(
    "old/snapshot_0" "wasi_unstable"
);

pub fn is_wasi_module(name: &str) -> bool {
    // FIXME: this should be more conservative, but while WASI is in flux and
    // we're figuring out how to support multiple revisions, this should do the
    // trick.
    name.starts_with("wasi")
}