Skip to content

Commit

Permalink
wasi-nn: pare down build.rs
Browse files Browse the repository at this point in the history
The `build.rs` script was only telling Wiggle where the WITX files
lived. We do need to retain it, though, for `env!("OUT_DIR")` to still
work.

prtest:full
  • Loading branch information
abrown committed May 3, 2024
1 parent 8c565f1 commit 64cfaaa
Showing 1 changed file with 2 additions and 11 deletions.
13 changes: 2 additions & 11 deletions crates/wasi-nn/build.rs
Original file line number Diff line number Diff line change
@@ -1,13 +1,4 @@
//! This build script:
//! - has the configuration necessary for the Wiggle and WITX macros.
fn main() {
// This is necessary for Wiggle/WITX macros.
let cwd = std::env::current_dir().unwrap();
let wasi_root = cwd.join("witx");
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());
}
// No build step needed: this just ensures `env!("OUT_DIR")` is for test
// artifacts.
}

0 comments on commit 64cfaaa

Please sign in to comment.