* Move back to only one WASI submodule This commit fixes the issue where we have two WASI submodules for build reasons in this repository. The fix was to place the submodule in the `wasi-common` crate, and then anyone using the `wig` crate has to be sure to define a `WASI_ROOT` env var in a build script to be able to parse witx files. With all that in place `wasi-common` becomes the source of truth for the witx files we're parsing, and crates like `wasmtime-wasi` use build-scripts shenanigans to read the same witx files. This should hopefully get us so we're compatible with publishing and still only have one submodule! * rustfmt
15 lines
517 B
Rust
15 lines
517 B
Rust
pub mod old;
|
|
|
|
pub use wasi_common::{WasiCtx, WasiCtxBuilder};
|
|
|
|
// Defines a `struct Wasi` with member fields and appropriate APIs for dealing
|
|
// with all the various WASI exports.
|
|
wig::define_wasi_struct_for_wiggle!("phases/snapshot/witx/wasi_snapshot_preview1.witx");
|
|
|
|
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")
|
|
}
|