rust-lang / rust-lang/cargo

More granular locking in cargo_rustc

Open
#4,282 21 comments 8 reactions 1 assignee View on GitHub

@ranger-ross is already working on this.

Since Oct 16, 2025.

A-build-execution A-layout C-feature-request C-tracking-issue Performance S-needs-mentor
Dominant language
Rust
Stars
15.5k
Forks
3k
Avg merge
23h 30m
Merged PRs (30d)
51

Description

View all comments

Summary

Implementation:

  • #16307
  • #16155
Known issues
  • Only non-artifact-producing commands (like check) can run in parallel
Unresolved Issues
Future Extensions
About tracking issues

Tracking issues are used to record the overall progress of implementation.
They are also used as hubs connecting to other relevant issues, e.g., bugs or open design questions.
A tracking issue is however not meant for large scale discussion, questions, or bug reports about a feature.
Instead, open a dedicated issue for the specific matter and add the relevant feature gate label.


Original issue:

Right now whenever a build happens we lock the entirety of the target directory for the whole build, but it may be possible for us to have a more granular locking strategy which allows multiple instances of Cargo to proceed in parallel instead of serializing them.

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.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.