From 3ebef32c43ca3def79c16a04b10adb5360ccbf4e Mon Sep 17 00:00:00 2001 From: Eliza Weisman Date: Thu, 10 Nov 2022 11:09:52 -0800 Subject: [PATCH] fix(kernel): ensure build script is rerun on changes (#372) This ensures that the build script is re-run if the hello world wasm or the target spec change. --- build.rs | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/build.rs b/build.rs index 0472e80a..3619dded 100644 --- a/build.rs +++ b/build.rs @@ -7,6 +7,9 @@ fn main() -> Result<(), Box> { // Build our helloworld.wast into binary. let binary = wat::parse_file("src/helloworld.wast")?; - fs::write(out_dir.join("helloworld.wasm"), binary)?; + fs::write(out_dir.join("helloworld.wasm"), &binary)?; + + println!("cargo:rerun-if-changed=src/helloworld.wast"); + println!("cargo:rerun-if-changed=x86_64-mycelium.json"); Ok(()) }