Move back to only one WASI submodule (#1434)
* 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
This commit is contained in:
@@ -21,11 +21,11 @@ enum Abi {
|
||||
/// I'd recommend using `cargo +nightly expand` to explore the output of this
|
||||
/// macro some more.
|
||||
pub fn define_struct(args: TokenStream) -> TokenStream {
|
||||
let (path, _phase) = utils::witx_path_from_args(args);
|
||||
let path = utils::witx_path_from_args(args);
|
||||
let doc = match witx::load(&[&path]) {
|
||||
Ok(doc) => doc,
|
||||
Err(e) => {
|
||||
panic!("error opening file {}: {}", path, e);
|
||||
panic!("error opening file {}: {}", path.display(), e);
|
||||
}
|
||||
};
|
||||
|
||||
@@ -265,11 +265,11 @@ pub fn define_struct(args: TokenStream) -> TokenStream {
|
||||
}
|
||||
|
||||
pub fn define_struct_for_wiggle(args: TokenStream) -> TokenStream {
|
||||
let (path, _phase) = utils::witx_path_from_args(args);
|
||||
let path = utils::witx_path_from_args(args);
|
||||
let doc = match witx::load(&[&path]) {
|
||||
Ok(doc) => doc,
|
||||
Err(e) => {
|
||||
panic!("error opening file {}: {}", path, e);
|
||||
panic!("error opening file {}: {}", path.display(), e);
|
||||
}
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user