Section: Build scripts, install, and publish checks

Minimal build.rs rerun rule

rust
rust
fn main() {
    println!("cargo::rerun-if-changed=src/schema.sql");
}
Explanation

Useful when debugging why `build.rs` seems to rerun too often or not often enough.

Learn the surrounding workflow

Compare similar commands or jump into common fixes when this command is part of a bigger troubleshooting path.

Related commands

Same sheet · prioritizing Build scripts, install, and publish checks
Inspect build-script output clearly
Use very verbose mode to surface build-script details.
OpenIn sheetbashsame section
Install the current CLI crate locally
Compile and install from the current path.
OpenIn sheetbashsame section
Reinstall a local CLI forcefully
Overwrite an existing installed binary.
OpenIn sheetbashsame section
See what would be packaged
Preview which files Cargo will include.
OpenIn sheetbashsame section
Validate publishing without uploading
Run Cargo’s publish checks as a dry run.
OpenIn sheetbashsame section
Build with the lockfile enforced
Refuse dependency resolution changes during CI.
OpenIn sheetbash1 tag match