Browse Source

wasi-nn: rebuild if the witx files change

pull/2555/head
Léo Gaspard 4 years ago
committed by Andrew Brown
parent
commit
c0c4834c64
  1. 1
      Cargo.lock
  2. 3
      crates/wasi-nn/Cargo.toml
  3. 5
      crates/wasi-nn/build.rs

1
Cargo.lock

@ -2727,6 +2727,7 @@ dependencies = [
"log",
"openvino",
"thiserror",
"walkdir",
"wasmtime",
"wasmtime-runtime",
"wasmtime-wasi",

3
crates/wasi-nn/Cargo.toml

@ -25,5 +25,8 @@ wiggle = { path = "../wiggle", version = "0.21.0" }
openvino = "0.1.5"
thiserror = "1.0"
[build-dependencies]
walkdir = "2.3"
[badges]
maintenance = { status = "experimental" }

5
crates/wasi-nn/build.rs

@ -7,4 +7,9 @@ fn main() {
// This is necessary for Wiggle/Witx macros.
let wasi_root = PathBuf::from("./spec").canonicalize().unwrap();
println!("cargo:rustc-env=WASI_ROOT={}", wasi_root.display());
// Also automatically rebuild if the Witx files change
for entry in walkdir::WalkDir::new(wasi_root) {
println!("cargo:rerun-if-changed={}", entry.unwrap().path().display());
}
}

Loading…
Cancel
Save