Skip to content

build-std: explicit dependencies#3875

Open
davidtwco wants to merge 42 commits intorust-lang:masterfrom
davidtwco:build-std-part-three-explicit-dependencies
Open

build-std: explicit dependencies#3875
davidtwco wants to merge 42 commits intorust-lang:masterfrom
davidtwco:build-std-part-three-explicit-dependencies

Conversation

@davidtwco
Copy link
Copy Markdown
Member

@davidtwco davidtwco commented Oct 31, 2025

View all comments

Allow users to add explicit dependencies on standard library crates in the Cargo.toml. This enables Cargo to determine which standard library crates are required by the crate graph without build-std-crates being set and for different crates to require different standard library crates.

This RFC is is part of the build-std project goal and a series of build-std RFCs:

  1. build-std context (build-std: context #3873)
  2. build-std="always" (build-std: always #3874)
  3. Explicit standard library dependencies (this RFC)
  4. build-std="compatible" (RFC not opened yet)
  5. build-std="match-profile" (RFC not opened yet)

There is also a Zulip channel where you can ask questions about any of the build-std RFCs. This series of RFCs was drafted over many months with the help of stakeholders from many Rust project teams, we thank them for their help!

There are some details that have been noted as being worth mentioning in any eventual tracking issues:

FCP

Rendered

@davidtwco davidtwco added T-cargo Relevant to the Cargo team, which will review and decide on the RFC. T-crates-io Relevant to the crates.io team, which will review and decide on the RFC. labels Oct 31, 2025
@Turbo87 Turbo87 moved this to For next meeting in crates.io team meetings Oct 31, 2025
Comment thread text/3875-build-std-explicit-dependencies.md
Comment thread text/3875-build-std-explicit-dependencies.md
Comment thread text/3875-build-std-explicit-dependencies.md
Comment thread text/3875-build-std-explicit-dependencies.md
Comment thread text/3875-build-std-explicit-dependencies.md Outdated
Comment thread text/3875-build-std-explicit-dependencies.md Outdated
Comment thread text/3875-build-std-explicit-dependencies.md
Comment thread text/3875-build-std-explicit-dependencies.md Outdated
Comment thread text/3875-build-std-explicit-dependencies.md Outdated
Comment thread text/3875-build-std-explicit-dependencies.md
Comment thread text/3875-build-std-explicit-dependencies.md Outdated
Comment thread text/3875-build-std-explicit-dependencies.md Outdated
Comment thread text/3875-build-std-explicit-dependencies.md Outdated
Comment thread text/3875-build-std-explicit-dependencies.md
Comment thread text/3875-build-std-explicit-dependencies.md Outdated
Comment thread text/3875-build-std-explicit-dependencies.md Outdated
@epage
Copy link
Copy Markdown
Contributor

epage commented Feb 6, 2026

@rfcbot fcp resolve redundant-no-std

@ehuss ehuss moved this from FCP blocked to FCP merge in Cargo status tracker Feb 17, 2026
@LawnGnome LawnGnome moved this from Backlog to For next meeting in crates.io team meetings Feb 26, 2026
Comment thread text/3875-build-std-explicit-dependencies.md Outdated
Comment thread text/3875-build-std-explicit-dependencies.md
Comment thread text/3875-build-std-explicit-dependencies.md
Copy link
Copy Markdown
Member

@weihanglo weihanglo left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks and sorry for the late review.

View changes since this review

Comment thread text/3875-build-std-explicit-dependencies.md
Comment thread text/3875-build-std-explicit-dependencies.md
Comment thread text/3875-build-std-explicit-dependencies.md
Comment thread text/3875-build-std-explicit-dependencies.md Outdated
Comment thread text/3875-build-std-explicit-dependencies.md Outdated
Comment thread text/3875-build-std-explicit-dependencies.md Outdated
Comment thread text/3875-build-std-explicit-dependencies.md
Comment thread text/3875-build-std-explicit-dependencies.md
@weihanglo
Copy link
Copy Markdown
Member

@rfcbot reviewed

### Registries
[registries]: #registries

Standard library dependencies will be present in the registry index such that
Copy link
Copy Markdown
Contributor

@arlosi arlosi Apr 20, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we need to consider what happens when a crate with builtin deps is uploaded to an existing 3rd party registry without explicit support for it?

View changes since the review

Copy link
Copy Markdown
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm not sure that this is any different than any other change or evolution of the registry index format such that it needs addressed specifically in this RFC. As I understand it, the format has been evolved in the past so could be again and there are means for doing so?

@davidtwco
Copy link
Copy Markdown
Member Author

@rust-rfcbot is having some issues, so leaving this comment to note that all but two checkboxes in the FCP have been checked, which means this RFC should be entering its 10 day final comment period.

@davidtwco davidtwco added final-comment-period Will be merged/postponed/closed in ~10 calendar days unless new substational objections are raised. and removed proposed-final-comment-period Currently awaiting signoff of all team members in order to enter the final comment period. labels Apr 24, 2026
@rust-rfcbot
Copy link
Copy Markdown
Collaborator

🔔 This is now entering its final comment period, as per the review above. 🔔

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

disposition-merge This RFC is in PFCP or FCP with a disposition to merge it. final-comment-period Will be merged/postponed/closed in ~10 calendar days unless new substational objections are raised. T-cargo Relevant to the Cargo team, which will review and decide on the RFC. T-crates-io Relevant to the crates.io team, which will review and decide on the RFC.

Projects

Status: FCP merge

Development

Successfully merging this pull request may close these issues.