rust-lang / rust-lang/cargo

Add a mechanism to inform cargo not to rebuild the crate after running build script

Open
#3,404 12 comments 1 reaction 0 assignees View on GitHub

Nobody has claimed this yet.

A-build-scripts A-rebuild-detection C-feature-request Command-build S-needs-design
Dominant language
Rust
Stars
15.5k
Forks
3k
Avg merge
23h 30m
Merged PRs (30d)
51

Description

Build script is usually used to do code generating, and sometimes, even the build script is triggered to rerun, the output generated code may not change at all. In that case, rebuilding the whole crate (and all its dependants) doesn't make sense.

There should be a mechanism for build script to inform that a rebuild is not needed from it.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start by reading Cargo's build-script rerun behavior and how it decides to rebuild the crate and its dependants. The issue does not name specific files or tests, so locate the build-script and crate-rebuild entry points first. Done means a build script can inform Cargo that its generated output is unchanged and avoid unnecessary rebuilding.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system
Issue type
Feature
Difficulty
5/5
Estimated time
Over a week
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
30/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.