Skip to content

Commit cbfae53

Browse files
Nao-risclaude
andcommitted
Prevent unnecessary rebuilds by adding rerun-if-changed directive
Add cargo:rerun-if-changed=build.rs to explicitly tell Cargo when to rebuild. Without this directive, Cargo's default behavior is to rerun the build script whenever any file in the package changes, causing unnecessary rebuilds when this crate is used as a dependency. 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <[email protected]>
1 parent f0e0327 commit cbfae53

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -201,6 +201,7 @@ fn generate_bindings() -> Result<(), Box<dyn Error>> {
201201
}
202202

203203
fn configure_rustc() -> Result<(), Box<dyn Error>> {
204+
println!("cargo:rerun-if-changed=build.rs");
204205
println!("cargo:rerun-if-changed=src/wrapper.h");
205206
println!("cargo:rerun-if-changed={}", CBL_INCLUDE_DIR);
206207
println!("cargo:rerun-if-changed={}", CBL_LIB_DIR);

0 commit comments

Comments
 (0)