Skip to content

Commit

Permalink
Use the new double-colon notation for build script instructions (goog…
Browse files Browse the repository at this point in the history
  • Loading branch information
ia0 authored Feb 18, 2025
1 parent c5a16c5 commit 5bf3303
Show file tree
Hide file tree
Showing 5 changed files with 11 additions and 10 deletions.
2 changes: 1 addition & 1 deletion crates/runner-nordic/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,5 +13,5 @@
// limitations under the License.

fn main() {
println!("cargo:rerun-if-changed=memory.x");
println!("cargo::rerun-if-changed=memory.x");
}
4 changes: 2 additions & 2 deletions crates/runner-nordic/crates/bootloader/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,6 @@
// limitations under the License.

fn main() {
println!("cargo:rustc-link-arg=-Tlink.x");
println!("cargo:rerun-if-changed=memory.x");
println!("cargo::rustc-link-arg=-Tlink.x");
println!("cargo::rerun-if-changed=memory.x");
}
1 change: 1 addition & 0 deletions crates/scheduler/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,7 @@

### Patch

- Use `cargo::` instead of `cargo:` for build script instructions
- Add warning when applet fails to start after install
- Fix clippy lints
- Update dependencies
Expand Down
6 changes: 3 additions & 3 deletions crates/scheduler/src/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -15,8 +15,8 @@
fn main() {
if std::env::var_os("CARGO_FEATURE_NATIVE").is_some() {
let src = std::fs::canonicalize("../../target/wasefire/libapplet.a").unwrap();
println!("cargo:rustc-link-search={}", src.parent().unwrap().display());
println!("cargo:rustc-link-lib=applet");
println!("cargo:rerun-if-changed={}", src.display());
println!("cargo::rustc-link-search={}", src.parent().unwrap().display());
println!("cargo::rustc-link-lib=applet");
println!("cargo::rerun-if-changed={}", src.display());
}
}
8 changes: 4 additions & 4 deletions crates/wasm-bench/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -40,20 +40,20 @@ fn main() {
Target::Riscv => Some("memory-riscv.x"),
};
if let Some(memory) = memory {
println!("cargo:rerun-if-changed={memory}");
println!("cargo::rerun-if-changed={memory}");
std::fs::copy(memory, out.join("memory.x")).unwrap();
println!("cargo:rustc-link-search={}", out.display());
println!("cargo::rustc-link-search={}", out.display());
}
const PATH: &str = "../../third_party/wasm3/wasm-coremark/coremark-minimal.wasm";
println!("cargo:rerun-if-changed={PATH}");
println!("cargo::rerun-if-changed={PATH}");
let mut module = std::fs::read(PATH).unwrap();
if runtime == Runtime::Wasmtime && target.is_embedded() {
let mut config = wasmtime::Config::new();
config.target("pulley32").unwrap();
let engine = wasmtime::Engine::new(&config).unwrap();
module = engine.precompile_module(&module).unwrap();
}
println!("cargo:warning=module size is {} bytes", module.len());
println!("cargo::warning=module size is {} bytes", module.len());
std::fs::write(out.join("module.bin"), &module).unwrap();
}

Expand Down

0 comments on commit 5bf3303

Please sign in to comment.