Skip to content

build-std: always - #3874

Merged
ehuss merged 33 commits into
rust-lang:masterfrom
davidtwco:build-std-part-two-always
Apr 15, 2026
Merged

build-std: always#3874
ehuss merged 33 commits into
rust-lang:masterfrom
davidtwco:build-std-part-two-always

Conversation

@davidtwco

@davidtwco davidtwco commented Oct 31, 2025

Copy link
Copy Markdown
Member

View all comments

Add a new Cargo configuration option, build-std = "always|never", which will unconditionally rebuild standard library dependencies. The set of standard library dependencies can optionally be customised with a new build-std-crates option. It also describes how Cargo (or external tools) should build the standard library crates on stable (i.e., which flags to pass and features to enable).

This proposal limits the ways the built standard library can be customised (such as by settings in the profile) and intends that the build standard library matches the prebuilt one (if available) as closely as possible.

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" (this RFC)
  3. Explicit standard library dependencies (build-std: explicit dependencies #3875)
  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!

FCP

Rendered

This was referenced Oct 31, 2025
@davidtwco davidtwco added T-libs-api Relevant to the library API team, which will review and decide on the RFC. T-compiler Relevant to the compiler team, which will review and decide on the RFC. T-cargo Relevant to the Cargo team, which will review and decide on the RFC. labels Oct 31, 2025
Comment thread text/3874-build-std-always.md Outdated
Comment thread text/3874-build-std-always.md
Comment thread text/3874-build-std-always.md Outdated
Comment thread text/3874-build-std-always.md Outdated
Comment thread text/3874-build-std-always.md
Comment thread text/3874-build-std-always.md Outdated
Comment thread text/3874-build-std-always.md Outdated
Comment thread text/3874-build-std-always.md Outdated
Comment thread text/3874-build-std-always.md Outdated
Comment thread text/3874-build-std-always.md Outdated
@ehuss ehuss moved this to RFC needs review in Cargo status tracker Nov 4, 2025
Comment thread text/3874-build-std-always.md Outdated
Comment thread text/3874-build-std-always.md Outdated
Comment thread text/3874-build-std-always.md Outdated
Comment thread text/3874-build-std-always.md Outdated
Comment thread text/3874-build-std-always.md Outdated
Comment thread text/3874-build-std-always.md Outdated
Comment thread text/3874-build-std-always.md
@joshtriplett

joshtriplett commented Mar 31, 2026

Copy link
Copy Markdown
Member

@rfcbot reviewed

Thank you for a very clear and detailed writeup!

@epage

epage commented Mar 31, 2026

Copy link
Copy Markdown
Contributor

@rfcbot fcp resolve rustflags-profile-inconsistency

@epage

epage commented Mar 31, 2026

Copy link
Copy Markdown
Contributor

@rfcbot fcp resolved user-profile

@rust-rfcbot rust-rfcbot 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 Mar 31, 2026
@rust-rfcbot

Copy link
Copy Markdown
Collaborator

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

Comment thread text/3874-build-std-always.md Outdated
Comment thread text/3874-build-std-always.md Outdated
Comment thread text/3874-build-std-always.md
@rust-rfcbot rust-rfcbot added finished-final-comment-period The final comment period is finished for this RFC. to-announce and removed final-comment-period Will be merged/postponed/closed in ~10 calendar days unless new substational objections are raised. labels Apr 10, 2026
@rust-rfcbot

Copy link
Copy Markdown
Collaborator

The final comment period, with a disposition to merge, as per the review above, is now complete.

As the automated representative of the governance process, I would like to thank the author for their work and everyone else who contributed.

@ehuss
ehuss merged commit 5847aa1 into rust-lang:master Apr 15, 2026
@ehuss

ehuss commented Apr 15, 2026

Copy link
Copy Markdown
Contributor

Thanks everyone! The tracking issue is rust-lang/rust#155363.

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. finished-final-comment-period The final comment period is finished for this RFC. T-cargo Relevant to the Cargo team, which will review and decide on the RFC. T-compiler Relevant to the compiler team, which will review and decide on the RFC. T-libs-api Relevant to the library API team, which will review and decide on the RFC. to-announce

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.