* 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
9 lines
325 B
Rust
9 lines
325 B
Rust
// Tell any dependencies, if necessary, where our WASI submodule is so they can
|
|
// use the same witx files if they want.
|
|
fn main() {
|
|
let cwd = std::env::current_dir().unwrap();
|
|
let wasi = cwd.join("WASI");
|
|
println!("cargo:wasi={}", wasi.display());
|
|
println!("cargo:rustc-env=WASI_ROOT={}", wasi.display());
|
|
}
|