wasi-nn: rebuild if the witx files change

This commit is contained in:
Léo Gaspard
2021-01-06 23:48:18 +01:00
committed by Andrew Brown
parent 4018a06da2
commit c0c4834c64
3 changed files with 9 additions and 0 deletions

1
Cargo.lock generated
View File

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

View File

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

View File

@@ -7,4 +7,9 @@ fn main() {
// This is necessary for Wiggle/Witx macros. // This is necessary for Wiggle/Witx macros.
let wasi_root = PathBuf::from("./spec").canonicalize().unwrap(); let wasi_root = PathBuf::from("./spec").canonicalize().unwrap();
println!("cargo:rustc-env=WASI_ROOT={}", wasi_root.display()); 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());
}
} }