Skip to content

Conversation

@ojuschugh1
Copy link
Contributor

This PR fixes this issue-: #9423

@rustbot rustbot added A-cli Area: Command-line interface, option parsing, etc. A-documenting-cargo-itself Area: Cargo's documentation Command-metadata labels Nov 29, 2025
@ojuschugh1 ojuschugh1 force-pushed the support-filter-platform-host branch from 7c879ff to dcd1680 Compare November 29, 2025 13:23
@rustbot rustbot added the A-cli-help Area: built-in command-line help label Nov 29, 2025
@ojuschugh1 ojuschugh1 marked this pull request as ready for review November 29, 2025 13:26
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 29, 2025
@rustbot
Copy link
Collaborator

rustbot commented Nov 29, 2025

r? @weihanglo

rustbot has assigned @weihanglo.
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

)
.with_stdout_data(
str![[r#"
{
Copy link
Member

Choose a reason for hiding this comment

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

This output could probably be a variable shared with both explicit triple and host-tuple.

"filter-platform",
"TRIPLE",
"Only include resolve dependencies matching the given target-triple",
"TRIPLE|host-tuple|host",
Copy link
Member

@weihanglo weihanglo Nov 29, 2025

Choose a reason for hiding this comment

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

I don't feel like host-tuple is important enough to add to help text.
(At least other commands didn't)

Let's treat them the same.

@epage
Copy link
Contributor

epage commented Nov 29, 2025

Sorry for the confusion on this but host is not intended to be supported. The Issue mentioned it but we later decided in another issue that host-tuple would be our term for it.

See #9423 (comment)

@ojuschugh1 ojuschugh1 force-pushed the support-filter-platform-host branch from dcd1680 to b66c08c Compare November 29, 2025 19:00
@ojuschugh1 ojuschugh1 marked this pull request as draft November 29, 2025 19:03
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 29, 2025
@ojuschugh1 ojuschugh1 force-pushed the support-filter-platform-host branch from b66c08c to c15640a Compare November 29, 2025 19:09
{{#option "`--filter-platform` _triple_" }}
This filters the `resolve` output to only include dependencies for the
given [target triple](../appendix/glossary.html#target).
The value `host-tuple` can be used to use the host target triple.
Copy link
Member

Choose a reason for hiding this comment

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

Maybe follow the existing doc? https://doc.rust-lang.org/cargo/commands/cargo-build.html#compilation-options

Suggested change
The value `host-tuple` can be used to use the host target triple.
A literal `"host-tuple"` can be used, which will internally be substituted by the host’s target.

Signed-off-by: Ojus Chugh <ojuschugh@gmail.com>
Signed-off-by: Ojus Chugh <ojuschugh@gmail.com>
Signed-off-by: Ojus Chugh <ojuschugh@gmail.com>
@ojuschugh1 ojuschugh1 force-pushed the support-filter-platform-host branch from c15640a to 6fffcee Compare November 29, 2025 19:38
@ojuschugh1 ojuschugh1 marked this pull request as ready for review November 29, 2025 19:46
@rustbot rustbot added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 29, 2025
@weihanglo weihanglo linked an issue Nov 29, 2025 that may be closed by this pull request
@weihanglo weihanglo added this pull request to the merge queue Nov 29, 2025
Merged via the queue into rust-lang:master with commit ebd20d2 Nov 29, 2025
26 checks passed
@rustbot rustbot removed the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Nov 29, 2025
@ojuschugh1 ojuschugh1 deleted the support-filter-platform-host branch November 30, 2025 06:41
bors added a commit to rust-lang/rust that referenced this pull request Dec 3, 2025
Update cargo submodule

14 commits in 2a7c4960677971f88458b0f8b461a866836dff59..bd979347d814dfe03bba124165dbce9554d0b4d8
2025-11-25 19:58:07 +0000 to 2025-12-02 16:03:50 +0000
- fix(completion): Put host-tuple before actual tuples (rust-lang/cargo#16327)
- fix(lints): use plural form correctly (rust-lang/cargo#16324)
- fix(completions): include `all` in `cargo tree --target` candidates (rust-lang/cargo#16322)
- fix(lints): show lint error number (rust-lang/cargo#16320)
- chore(deps): update compatible (rust-lang/cargo#16318)
- chore(deps): update crate-ci/typos action to v1.40.0 (rust-lang/cargo#16316)
- Do not lock the artifact-dir for check builds + fix uplifting (rust-lang/cargo#16307)
- Properly validate crate names in `cargo install` (rust-lang/cargo#16314)
- Support --filter-platform=host for cargo metadata rust-lang/cargo#9423 (rust-lang/cargo#16312)
- Update to mdbook 0.5 (rust-lang/cargo#16292)
- refactor(clean): Better divide old / new layout (rust-lang/cargo#16304)
- update: silent failure on non-matching package specs with --breaking (rust-lang/cargo#16276)
- fix(log): break timing-info message to multiple (rust-lang/cargo#16303)
- fix(clean): Clean hosts builds with new layout (rust-lang/cargo#16300)
@rustbot rustbot added this to the 1.93.0 milestone Dec 3, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

A-cli Area: Command-line interface, option parsing, etc. A-cli-help Area: built-in command-line help A-documenting-cargo-itself Area: Cargo's documentation Command-metadata

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Support --filter-platform=host for cargo metadata

4 participants