wiggle-wasmtime: witx paths should be relative to CARGO_MANIFEST_DIR, not WASI_ROOT

the WASI_ROOT was leftover from when this code was part of `wig`.
This commit is contained in:
Pat Hickey
2020-08-27 16:03:05 -07:00
parent 8ac4bd1d0d
commit 82d2a48896

View File

@@ -48,9 +48,9 @@ use config::{MissingMemoryConf, ModuleConf, TargetConf};
#[proc_macro]
pub fn wasmtime_integration(args: TokenStream) -> TokenStream {
let mut config = parse_macro_input!(args as config::Config);
config
.witx
.make_paths_relative_to(std::env::var("WASI_ROOT").expect("WASI_ROOT env var"));
config.witx.make_paths_relative_to(
std::env::var("CARGO_MANIFEST_DIR").expect("CARGO_MANIFEST_DIR env var"),
);
let doc = config.load_document();
let names = Names::new(&config.ctx.name, quote!(wasmtime_wiggle));