rust-lang / rust-lang/cargo

`cargo package` (and hence `cargo publish`) verify step is slow from doing a full build

Open
#14,941 9 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Command-package Command-publish Performance S-needs-design
Dominant language
Rust
Stars
15.5k
Forks
3k
Avg merge
23h 30m
Merged PRs (30d)
51

Description

In testing workspace publishing, I was really wishing for the build to be faster when I noticed the sea of status messages was "Compiling", instead of "Checking".
I've been glossing over those messages for years and never noticed!

If we switch from cargo build to `cargo check it would make builds faster by skipping the compiler backend / codegen at the cost of not getting post-monomorphization errors. That seems like a small price to pay.

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 locating the verification step used by cargo package and cargo publish, then compare how it invokes cargo build and cargo check. Confirm the existing package and publish tests around verification, and define done as using checking behavior while accepting the stated loss of post-monomorphization errors.

Written by the indexing model from the issue text.

Assessment

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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.