Skip to content
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

Add self default-host command, make it configurable at install #309

Closed
brson opened this issue Apr 13, 2016 · 7 comments
Closed

Add self default-host command, make it configurable at install #309

brson opened this issue Apr 13, 2016 · 7 comments

Comments

@brson
Copy link
Contributor

brson commented Apr 13, 2016

On Windows in particular, there are lots of architectures people may prefer to build for by default. Right now you have to either download a specific build of rustup to get a specific host compiler, or you have to explicitly install each toolchain for that architecture.

This behavior is too surprising and the solution too undiscoverable. I think the best thing to do is have a "default host" configuration and make it configurable at install time.

The commands for this might be rustup self set-default-host and rustup self show-default-host.

During installation, as part of the install message, we'll mention the host architecture and that it can be changed. We may only need to indicate this in the Windows install message, since that's where it matters most, not sure.

@brson
Copy link
Contributor Author

brson commented Apr 13, 2016

rustup-init also needs a --default-host option.

@Diggsey
Copy link
Contributor

Diggsey commented Apr 13, 2016

Some related things that would be nice:

  1. Look for WOW64 or Win64 in the User Agent string on rustup.rs when deciding which build architecture to use. (http://stackoverflow.com/questions/1741933/detect-64-bit-or-32-bit-windows-from-user-agent-or-javascript). This is an easy fix that will immediately improve things for most people encountering this problem.

This may seem redundant, but I'd prefer rustup itself to be 64-bit if I'm using it on a 64-bit OS.

  1. Make some attempt to detect the host architecture on install. This means eg. checking if the host is 64-bit even if rustup itself is 32-bit, and similar for other platforms.

  2. When installing interatively, ask the user to confirm or change the host architecture.

@brson
Copy link
Contributor Author

brson commented Apr 19, 2016

  1. Make some attempt to detect the host architecture on install. This means eg. checking if the host is 64-bit even if rustup itself is 32-bit, and similar for other platforms.

Yeah, good idea.

@brson
Copy link
Contributor Author

brson commented Apr 19, 2016

After further pondering I prefer rustup toolchain set-default-host and rustup toolchain show-default-host since this affects toolchain selection.

@petrochenkov
Copy link
Contributor

It would be useful to have an option to not install any toolchains.

Scenario: there's a server with several users and one common preinstalled Rust toolchain that is not in PATH.
A new user installs rustup and "connects" to that toolchain with rustup toolchain link without installing any toolchains for himself.

@brson
Copy link
Contributor Author

brson commented Apr 25, 2016

@petrochenkov Agreed, yeah.

The case of installing rustup system-wide needs more attention generally. I think there's a strong case for distributing rustup through normal platform stores, not doing self-updates, etc.

@Diggsey
Copy link
Contributor

Diggsey commented May 8, 2016

This is implemented with #421

@brson brson closed this as completed Jun 23, 2016
bors added a commit that referenced this issue Oct 6, 2017
Support `rustup-init --default-toolchain none`

To address this use case #309 (comment).

This is especially useful when user directories have quotas into which large components (e.g. docs) do not fit.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants