-
Notifications
You must be signed in to change notification settings - Fork 899
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Provide Command to Show Host Tuple #1663
Comments
The host triple can be determined from |
Will rustc always show the host's triple as opposed to whatever toolchain that rustc is compiling for? |
The The host triple may have different values on the same machine. For example, it is possible to run an i686 rustc binary on an x86 machine, or various different abi's on linux or windows (musl, gnu, msvc, etc.). So you can't really say there is one "host", the user can pick different ones. rustup has a "default" toolchain, but without knowing more about what you need it for, it's hard to say which information is relevant. |
@ehuss my use case is that when a user specifies that they'd like e.g. a user passes fn is_component_installed(component: &str, installed_components: &[&str]) -> bool {
let triple = get_rust_host_triple();
for installed_component in installed_components {
if component == installed_component || format!("{}-{}", component, triple) == installed_component {
return true;
}
}
return false
} This means that I won't have to force my users to specify fully qualified component names. |
|
Yeah, I considered this. My only concern is that
|
Yea, it seems like #450 would be helpful. It's hard to say how stable the output is. |
So this has been sitting around for over a year. I think that the maintainers aren't going to get to it. #450 is something we are likely to get to, but we can't promise even with that that we wouldn't ever accidentally change some output - though we would of course do our best ;). For now, I'm closing this, but if someone were to put up a PR, we'd be happy to have a subcommand that does it I think, its just that there is no point having a ticket saying 'please add this' - its not on the roadmap. |
Describe the problem you are trying to solve
Similar to #1659, I'm writing automation around
rustup
. I need a way to get thex86_64-unknown-linux-gnu
tuple fromrustup
to find out what the host platform is in a way that I can then use aroundrustup
.Describe the solution you'd like
I may PR this in, but a command like
rustup host
which displayed this architecture would be ideal.The text was updated successfully, but these errors were encountered: