request: a flag to limit target list results by support tier level
Nobody has claimed this yet.
- Dominant language
- Rust
- Stars
- 7k
- Forks
- 1.1k
- Avg merge
- 22h 40m
- Merged PRs (30d)
- 46
Description
Problem you are trying to solve
Hi,
I want to loop over the tier 1 and tier 2 targets and cross-compile my Rust apps for these platforms. I do this for my Rust projects in order to make it easier for non-Rust users to enjoy my command line tools!
I have a working script to do just that, called crit, based on the excellent cross tool.
https://github.com/mcandre/crit
This works (yay!) for about 80% of the available triples from rustup target list. Unfortunately, it requires hardcoding target triples to skip over, namely the tier 3 triples, for which the cross community has yet to publish stable Docker images.
Over time, this triple exclusion hardcoding represents some extra maintenance and fragility. I would prefer that rustup be able to filter by support tier as a built-in capability.
There is an HTML source of truth to get this data:
https://doc.rust-lang.org/rustc/platform-support.html
But of course HTML is not the most friendly or robust way to query the information in an automated fashion.
Solution you'd like
I would love for rustup target list to accept an optional flag, like --max-support-tier <n>.
When present, the flag elides target triples from the console output whose support tier is known to be larger than n.
Alternatively, add a new column to the target triple output lines, indicating the support tier number. Then, we still have an automated source of truth, which downstream CLI tools could reasonably handle parsing with simple regular expressions / awk / etc.
Notes
No response
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the rustup target list command and review how its target data relates to the support tiers in https://doc.rust-lang.org/rustc/platform-support.html. Determine the intended behavior for --max-support-tier <n> or a support-tier column, including unavailable or unknown tiers. Done means the chosen interface exposes reliable tier information for automated consumers and has corresponding coverage.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- cli
- Issue type
- Feature
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Mostly clear
- Newbie friendliness
- 35/100