rust-lang / rust-lang/cargo

Cargo installing multiple bin crates doesn't build them in parallel

Open
#9,741 5 comments 9 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

C-feature-request Command-install Performance S-needs-design
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

When installing multiple bin crates, such as suggested by the rustc-dev-guide build instructions they are built sequentially. This doesn't fully utilize available parallelism on many-core systems and thus leads to longer build times than necessary.

Describe the solution you'd like

It would be nice if the binaries could be built in parallel under a shared jobserver to reduce wall-time for the install command.

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

Reproduce the sequential installation described in the rustc-dev-guide build instructions and measure whether multiple bin crates run serially. Then trace Cargo's install path and jobserver handling; done means the binaries build in parallel under a shared jobserver without reducing build correctness.

Written by the indexing model from the issue text.

Assessment

Tech stack
rust
Domain
build-system
Issue type
Feature
Difficulty
4/5
Estimated time
3-5 days
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
35/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.