feat(builtin-deps): Add `SourceKind::Builtin` (#17513)
*[View all comments](https://triagebot.infra.rust-lang.org/gh-comments/rust-lang/cargo/pull/17513)* ### What does this PR try to resolve? As part of https://github.com/rust-lang/cargo/issues/16960 this PR adds a new variant of SourceKind to represent Builtin packages and integrates it into explicit builtin dependencies. This allows resolution to proceed slightly further, but is now blocked a Source capable of returning Packages and Summaries for builtin packages. A few notes: - A previous version of this PR bumped the version of `cargo-util-schemas`, but this has already been done this release cycle. - It's not quite clear what the behaviour of parsing/displaying URLs related to SourceIds should be, and I'm going to defer that to when I handle user-facing behaviour that requires it. - There's improvements possible to the way we fetch the standard library source path. We have a task on the goal's work plan to handle this later when the core implementation for Builtins is a bit more settled. For now I think this solution is reasonable. ### How to test and review this PR? Commit by commit - all commits pass tests. Existing user-facing behaviour is limited, but one test is updated to show the difference. 🤖 LLM disclosure: I used Codex to help me understand the codebase and asked it to review my branch before sharing it upstream. I also used it in limited ways to generate code, including resolving merge conflicts and updating test assertions. All code was originally written by hand. r? @Muscraft (we're trying to share out these reviews a bit, but I don't mind who reviews)
W
Weihang Lo committed
f888d009092e04b2a428f36ca21caef642e4c7e5
Committed by GitHub <noreply@github.com>
on 9/25/2026, 6:35:41 PM