Support the ability to re-run build scripts if and only if the crate is being compiled for other reasons
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 15.5k
- Forks
- 3k
- Avg merge
- 23h 30m
- Merged PRs (30d)
- 51
Description
Describe the problem you are trying to solve
We embed a bit of build-time metadata (e.g. git commit hash, wall-clock build time) inside our binaries. We specifically only would like to change this metadata on re-build, we don't want to force a rebuild because the metadata has changed. For example, checking out a commit that has only changed external documentation shouldn't retrigger a build, none of the source has changed. Also, when running tests, modifying the tests shouldn't necessarily retrigger a build of the library that the tests are running against.
Describe the solution you'd like
Perhaps a cargo:rerun-on-compile=true build.rs directive?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with Cargo's build-script rerun behavior and the proposed cargo:rerun-on-compile=true directive. Compare how rebuild decisions should behave when only external documentation or tests change. Done means the directive's semantics and affected build cases are specified clearly enough to guide implementation and validation.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- build-system, tooling
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 25/100