add wasmtime adapter and stdio wrappers

the stdio wrappers will not work on windows, but thats a whole other can
of worms anyway
This commit is contained in:
Pat Hickey
2020-12-11 15:00:19 -08:00
parent 73058658f4
commit 22db10e643
8 changed files with 238 additions and 0 deletions

View File

@@ -3,6 +3,8 @@
fn main() {
let cwd = std::env::current_dir().unwrap();
let wasi = cwd.join("..").join("wasi-common").join("WASI");
// this will be available to dependent crates via the DEP_WASI_C2_19_WASI env var:
println!("cargo:wasi={}", wasi.display());
// and available to our own crate as WASI_ROOT:
println!("cargo:rustc-env=WASI_ROOT={}", wasi.display());
}