-
Notifications
You must be signed in to change notification settings - Fork 911
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
Configurable host triple #421
Conversation
This is another sweet patch. I will review soon. |
☔ The latest upstream changes (presumably #419) made this pull request unmergeable. Please resolve the merge conflicts. |
1acdeb2
to
9830d33
Compare
This looks great. The only thing I see that looks wrong is that in self_update::prepare_update the triple needs to come from the I don't know what I think of the I'm going to run this locally to see how the new install and show messages look and give you feedback. |
It looks like this doesn |
Unless I've missed somewhere, it already does? 😛
Good shout, I'll add that. |
Oh, yes, you are right. |
If you go with |
Here's what show looks like when there's lots of info:
With less information it probably looks like this (though I haven't tested):
So there's a new kind of information here, a global setting. I need to figure out how this fits into my mental model. Presumably there are other things we might want to put here, like the telemetry flag. This is definitely the least important info here - in the vast majority of cases nobody is going to touch this and the value will correspond to every toolchain installed. Visually, I think it sticks out a bit. Just an idea: add a Per our conversation I'm still inclined to call this value 'default host', but I'll keep mulling it over. |
Yeah, I only really added it to The one possible advantage of showing it would be if we wanted to shorten toolchain names when the target matches the host: showing the host would avoid any ambiguity. Regardless of the decision re: host, my primary concern is that a rustup configured with |
# Conflicts: # Cargo.lock # src/rustup-utils/Cargo.toml # src/rustup-utils/src/lib.rs # src/rustup/config.rs
# Conflicts: # Cargo.lock # src/rustup-cli/setup_mode.rs
I decided to just switch everything to I haven't added an I renamed what was |
This builds on the TOML branch, and allows the host triple to be configured at runtime. It also implements a host triple detection algorithm, using
GetNativeSystemInfo
on windows, anduname
on other platforms.The host triple can be configured both at install time, and using the CLI, via
rustup set host <xyz>
, andrustup show
starts by displaying the current host triple.