Skip to content

build-std: introduce standard_library_support to the target spec - #165419

Open
Bryanskiy wants to merge 4 commits into
rust-lang:mainfrom
Bryanskiy:build-std-std-stability
Open

Bryanskiy wants to merge 4 commits into
rust-lang:mainfrom
Bryanskiy:build-std-std-stability

Conversation

@Bryanskiy

Copy link
Copy Markdown
Contributor

Partial implementation of build-std: Standard library crate stability. More specifically:

How was standard_library_support set?
  • metadata.std = Some(true) -> standard_library_support.{supported,default} = "core, alloc, std"
  • metadata.std = None -> standard_library_support = None
  • metadata.std = Some(false) ->
    • standard_library_support.{supported,default} = "core, alloc" if the docs say that the alloc crate is supported.
    • standard_library_support.{supported,default} = "core" if the docs explicitly say it's not supported or say nothing.
    • For aarch64_unknown_linux_pauthtest the spec says full std is supported while metadata.std was false, so I changed it.

Currently I set default equal to supported, as I think it's a reasonable start and target maintainers can change it in the future. Also, there might be other discrepancies with the spec (like for aarch64_unknown_linux_pauthtest), but I didn't check all the targets.

Questions
  • The RFC first suggests using strings for both supported and default, but then in the examples it uses an array of crate names for supported and a single crate name for default. In the PR I used the first option.
  • Should it be part of the metadata field?

These are minor issues and I think they can be changed in the future anyway.

Future steps
  • Update Cargo to use --print target-standard-library-support instead of metadata.std
  • Update  docs
  • remove metadata.std

LLM disclosure: no LLM was used.

@rustbot

rustbot commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

Some changes occurred in compiler/rustc_target/src/spec/targets/amdgcn_amd_amdhsa.rs

cc @Flakebi

Target consistency checks are being changed

cc @RalfJung

These commits modify compiler targets.
(See the Target Tier Policy.)

@rustbot rustbot added S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue. labels Nov 3, 2026
@rustbot

rustbot commented Nov 3, 2026

Copy link
Copy Markdown
Collaborator

r? @oli-obk

rustbot has assigned @oli-obk.
They will have a look at your PR within the next two weeks and either review your PR or reassign to another reviewer.

Use r? to explicitly pick a reviewer

Why was this reviewer chosen?

The reviewer was selected based on:

  • Owners of files modified in this PR: compiler
  • compiler expanded to 77 candidates
  • Random selection from 22 candidates

@Bryanskiy

Copy link
Copy Markdown
Contributor Author

cc @adamgemmell

@rust-bors

rust-bors Bot commented Nov 5, 2026

Copy link
Copy Markdown
Contributor

☔ The latest upstream changes made this pull request unmergeable. Please resolve the merge conflicts by rebasing.

This branch has not been deployed

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

Labels

S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. T-compiler Relevant to the compiler team, which will review and decide on the PR/issue.

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants