build-std: explicit dependencies#3875
Conversation
| ### Why add standard library crates to Cargo's index? | ||
| [rationale-cargo-index]: #why-add-standard-library-crates-to-cargos-index | ||
|
|
||
| When Cargo builds the dependency graph, it is driven by the index (not | ||
| `Cargo.toml`), so builtin dependencies need to be included in the index. |
There was a problem hiding this comment.
Is this about adding them to the index (as top-level packages), which isn't needed, or adding dependencies on the standard library to the index format?
There was a problem hiding this comment.
Still not clear to me why they need to be in the index
There was a problem hiding this comment.
This was my understanding from @ehuss's earlier feedback but maybe I've misunderstood it?
There was a problem hiding this comment.
I'm not sure if this resolved your concern but given it's been a few weeks, I'll resolve this conversation thread so it's easier to keep track of what I still need to address. Feel free to reopen or start another thread.
|
@rfcbot fcp concern redundant-no-std See #3875 (comment) |
|
@rfcbot fcp resolve redundant-no-std |
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 withoutbuild-std-cratesbeing 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:
build-std="always"(build-std: always #3874)build-std="compatible"(RFC not opened yet)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