rust-lang / rust-lang/cargo

Provide a means to know the freshness state of a set of paths from build.rs

Open
#8,086 2 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

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

Description

build.rs helpers such as cc-rs and nasm-rs get executed every time and that may slow down rebuilding quite a lot depending on the amount of assembly code a project has.

We already have a mean to tell cargo about foreign files, would be great to query back their state so if they are fresh isn't needed to build them again.

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 with Cargo's existing mechanism for declaring foreign files and the build.rs path used by helpers such as cc-rs and nasm-rs. Determine the API needed to query whether those paths are fresh; done means projects can avoid unnecessary rebuild work while still rebuilding when foreign files change.

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
Needs clarification
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.