# Beta testing rustup.rs

**URL:** <https://internals.rust-lang.org/t/beta-testing-rustup-rs/3316>\
**Category:** Uncategorized\
**Created:** [March 28, 2016, 8:35pm UTC](https://internals.rust-lang.org/t/beta-testing-rustup-rs/3316 "2016-03-28T20:35:42Z")\
**Posts on this page:** 20\
**Page:** 1

<div class="post-metadata">

**Author:** ![brson](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/brson/32/5197_2.png) [@brson](https://internals.rust-lang.org/u/brson)\
**Post date:** [March 28, 2016, 8:35pm UTC](https://internals.rust-lang.org/t/beta-testing-rustup-rs/3316/1 "2016-03-28T20:35:42Z")

</div>

Hi all.

I’d like to introduce [rustup](http://www.rustup.rs/), the fabulous new way to install and manage Rust toolchains. This is the successor to [multirust](https://github.com/brson/multirust), and began as [multirust-rs](https://github.com/rust-lang-nursery/multirust-rs) by @Diggsey. Although there’s a lot of work yet to do on it, it is feature complete and I’d like to get some feedback. To try it just go to [http://www.rustup.rs](http://www.rustup.rs) and follow the instructions - everything you need to know should be reachable from there. I strongly recommend uninstalling any existing version of Rust before doing so.

After you’re done come back here and consider the questions below and leave your feedback. This is an early beta, and there’s still a lot of churn to come over the next month, so I caution against recommending it for wider use yet.

Thanks to @Diggsey for creating multirust-rs, to @chriskrycho for reviewing the rustup CLI, @alexcrichton for setting up the build infrastructure, and to all the multirust and multirust-rs users and contributors.

### Does grouping commands into subcommands help?

In order to make the CLI interface more approachable and leave more room for expansion I’ve grouped commands together logically, so commands that just manage toolchains are under `rustup toolchain [subcommand]`, those that deal with overrides `rustup override [subcommand]`. While this makes the CLI in some ways feel more consistent it also makes some common commands more verbose: for example adding a target is now `rustup target add` instead of `rustup add-target`. To then combat this verbosity there are some top-level commands that can be thought of as shortcuts, most notably the `rustup update` command, which could also be thought of as `rustup toolchain update` (which isn’t implemented to to avoid duplication).

The three ‘sub-command’ commands, `toolchain`, `override` and `self` also notably don’t do anything intersting when _not_ provided a subcommand. In other words, whereas `rustup toolchain list` is a real command, `rustup toolchain`, the shorter command, doesn’t do anything. I could imagine `rustup toolchain` for example displaying the current toolchain like `rbenv version` (but I have other reservations about using `rustup toolchain` for this).

I still feel mostly good about this direction, but not sure if the ergonomics are in order yet.

### Do `rustup` and `rustup update` do the right thing?

The simple `rustup` command is the ‘update all the things’ command. It updates all toolchains and self-updates, without confirmation. Originally I wanted this to be the only update command, but pretty quickly found myself just wanting to update nightly, so added `rustup update`. Now there are three ways to update toolchains: `rustup`, `rustup update nightly`, which does what you expect, and `rustup update` which updates _the active toolchain_.

I’ve already found myself typing `rustup update` and mistakenly wondering why it wasn’t ‘updating all the things’, which makes me think there are too many ways to update.

### Are the verbs right?

A lot of the rustup commands are transactional: add or remove some piece of the system. For example

- `rustup update <toolchain>` / `rustup toolchain remove <toolchain>`
- `rustup target add <target>` / `rustup target remove <target>`
- `rustup override add <toolchain>` / `rustup override remove`

So the ‘add’ / ‘remove’ verbs are consistent except for with toolchains, which use ‘update’, not ‘add’. And again, `update` being its own command for convenience makes the lack of a `rustup toolchain add` command inconsistent.

I happen to prefer _three_ different verbs for adding here - ‘update’ for adding (or updating) toolchains, ‘add’ for adding targets to an existing toolchain, and _‘set’_ for setting the override. If we were to follow that though then it would provide no intuition at all for adding different types of things.

### What information is missing from the website?

The website is supposed to be very slim, just enough to convince you to run the installer and get you on your way. Is there any other information that you were expecting to be given during install?

If anybody wants to try their hand at the website style too, I’m not wedded to this. I generally am going for something simple, strong, and authoritative. People who encounter it should think, “yeah, this website knows what’s up; I’m going to do what it says”.

---

<div class="post-metadata">

**Author:** ![steveklabnik](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/steveklabnik/32/4524_2.png) [@steveklabnik](https://internals.rust-lang.org/u/steveklabnik)\
**Post date:** [March 28, 2016, 9:28pm UTC](https://internals.rust-lang.org/t/beta-testing-rustup-rs/3316/2 "2016-03-28T21:28:20Z")

</div>

I uninstalled multirust, ran the installer, sourced the script, and then:

```rust
$ rustc --version
error: multirust's metadata is out of date. run multirust upgrade-data.

```

---

<div class="post-metadata">

**Author:** ![steveklabnik](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/steveklabnik/32/4524_2.png) [@steveklabnik](https://internals.rust-lang.org/u/steveklabnik)\
**Post date:** [March 28, 2016, 9:30pm UTC](https://internals.rust-lang.org/t/beta-testing-rustup-rs/3316/3 "2016-03-28T21:30:23Z")

</div>

Update:

```rust
$ rustup self upgrade-data
info: upgrading metadata version from '2' to '12'
warning: this upgrade will remove all existing toolchains. you will need to reinstall them

```

seems to have fixed this. Still not clear why it’s talking about multirust here.

---

<div class="post-metadata">

**Author:** ![steveklabnik](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/steveklabnik/32/4524_2.png) [@steveklabnik](https://internals.rust-lang.org/u/steveklabnik)\
**Post date:** [March 28, 2016, 9:31pm UTC](https://internals.rust-lang.org/t/beta-testing-rustup-rs/3316/4 "2016-03-28T21:31:26Z")

</div>

Okay, last post, I swear: I was also then confused when the `stable` toolchain wasn’t installed like it used to be. Dunno if this is good or bad. 😄

---

<div class="post-metadata">

**Author:** ![zsiciarz](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/zsiciarz/32/837_2.png) [@zsiciarz](https://internals.rust-lang.org/u/zsiciarz)\
**Post date:** [March 28, 2016, 9:36pm UTC](https://internals.rust-lang.org/t/beta-testing-rustup-rs/3316/5 "2016-03-28T21:36:39Z")

</div>

After installing rustup-setup.exe on Windows 7 (64bit) I got the “This program might not have installed correctly” warning dialog, but other than that everything works fine so far.

---

<div class="post-metadata">

**Author:** ![dirvine](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/dirvine/32/827_2.png) [@dirvine](https://internals.rust-lang.org/u/dirvine)\
**Post date:** [March 28, 2016, 9:42pm UTC](https://internals.rust-lang.org/t/beta-testing-rustup-rs/3316/6 "2016-03-28T21:42:28Z")

</div>

Ok steps I took were

`curl -sf https://raw.githubusercontent.com/brson/multirust/master/blastoff.sh | sh -s -- --uninstall` (uninstall multirust)

`curl https://sh.rustup.rs -sSf | sh`

`source $HOME/.cargo/env`

`multirust upgrade-data` (strange step name)

`rustup install stable`

Then I wanted my cargo commands back so

`cargo install rustfmt`

etc.

All seems running well now. Nice work, initial test looks good. Should help the community a lot to stabilise and get all verbage right etc. Now to play with cross compile etc. 😉

---

<div class="post-metadata">

**Author:** ![mitsuhiko](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/mitsuhiko/32/379_2.png) [@mitsuhiko](https://internals.rust-lang.org/u/mitsuhiko)\
**Post date:** [March 28, 2016, 9:44pm UTC](https://internals.rust-lang.org/t/beta-testing-rustup-rs/3316/7 "2016-03-28T21:44:00Z")

</div>

I’m utterly confused by this. So apparently `rustup install nightly` is a thing, yet `rustup --help` shows no commands?

---

<div class="post-metadata">

**Author:** ![mitsuhiko](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/mitsuhiko/32/379_2.png) [@mitsuhiko](https://internals.rust-lang.org/u/mitsuhiko)\
**Post date:** [March 28, 2016, 9:44pm UTC](https://internals.rust-lang.org/t/beta-testing-rustup-rs/3316/8 "2016-03-28T21:44:30Z")

</div>

Also the curl installation method puts a bunch of stuff into `~/.cargo` yet `rustup install nightly` puts it into `/usr/local`?!

---

<div class="post-metadata">

**Author:** ![mitsuhiko](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/mitsuhiko/32/379_2.png) [@mitsuhiko](https://internals.rust-lang.org/u/mitsuhiko)\
**Post date:** [March 28, 2016, 9:49pm UTC](https://internals.rust-lang.org/t/beta-testing-rustup-rs/3316/9 "2016-03-28T21:49:54Z")

</div>

Okay. `rustup install` is not a thing. To install one uses `rustup update nightly` now.

---

<div class="post-metadata">

**Author:** ![petrochenkov](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/petrochenkov/32/2784_2.png) [@petrochenkov](https://internals.rust-lang.org/u/petrochenkov)\
**Post date:** [March 28, 2016, 10:10pm UTC](https://internals.rust-lang.org/t/beta-testing-rustup-rs/3316/10 "2016-03-28T22:10:57Z")

</div>

Just tried this on Windows 8.1

First of all, “Windows SmartScreen prevented an unrecognized app from running. Running this app might put your PC at risk. Publisher: Unknown Publisher”.

After the confirmation `Y` of `Continue? (Y/n)` the console window closes very quickly. I noticed some panic message before the window closed, but it disappears too quickly to be read. `HKEY_CURRENT_USER/Environment/PATH` is not updated, some binaries however appear in `%USERNAME%\.cargo`.

---

<div class="post-metadata">

**Author:** ![jimmycuadra](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/jimmycuadra/32/576_2.png) [@jimmycuadra](https://internals.rust-lang.org/u/jimmycuadra)\
**Post date:** [March 28, 2016, 10:24pm UTC](https://internals.rust-lang.org/t/beta-testing-rustup-rs/3316/11 "2016-03-28T22:24:00Z")

</div>

Thanks for your work on this!

I agree with grouping the commands hierarchically (“override add” instead of “add-override”). That was one of my main annoyances with multirust previously. Subcommands which are only used for grouping their subcommands should use Clap’s `AppSettings::SubcommandRequiredElseHelp` setting to automatically explain what they contain to the user when not presented with a subcommand. I don’t think such “group only” subcommands should have any behavior themselves.

As for the website:

- [http://www.rustup.rs/](http://www.rustup.rs/) should 301 redirect to [https://www.rustup.rs/](https://www.rustup.rs/) with the HSTS header.
- The design should match the main Rust website to make it more clear that it’s an official way to install Rust. Right now there’s no way to know if this is just someone’s pet project or if it’s official.
- Perhaps the site should be hosted at [rustup.rust-lang.org](http://rustup.rust-lang.org) or something to make the official distinction very clear.

---

<div class="post-metadata">

**Author:** ![aturon](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/aturon/32/3272_2.png) [@aturon](https://internals.rust-lang.org/u/aturon)\
**Post date:** [March 28, 2016, 10:26pm UTC](https://internals.rust-lang.org/t/beta-testing-rustup-rs/3316/12 "2016-03-28T22:26:58Z")

</div>

Woohoo!

I tried this out locally. Due to being on `fish`, it didn’t update my `$PATH` automatically, and said:

```rust
It will add the `cargo`, `rustc`, `rustup` and other commands to
Cargo's bin directory, located at:

/Users/aturon/.cargo

This path needs to be added to your `PATH` environment variable ...

```

which I dutifully did. But it seems the _actual_ dir needed is `~/.cargo/bin` (missing the `/bin` above).

---

<div class="post-metadata">

**Author:** ![aturon](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/aturon/32/3272_2.png) [@aturon](https://internals.rust-lang.org/u/aturon)\
**Post date:** [March 28, 2016, 10:28pm UTC](https://internals.rust-lang.org/t/beta-testing-rustup-rs/3316/13 "2016-03-28T22:28:17Z")

</div>

So I ignored your instructions to uninstall Rust first, and got:

```rust
~ $ rustup
error: multirust's metadata is out of date. run multirust upgrade-data.
~ $ multirust upgrade-data
multirust: upgrading metadata from version 2 to 2
multirust: metadata is updated to version 2
multirust: success
~ $ rustup
error: multirust's metadata is out of date. run multirust upgrade-data.

```

I’m on OSX FWIW.

---

<div class="post-metadata">

**Author:** ![euclio](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/euclio/32/4705_2.png) [@euclio](https://internals.rust-lang.org/u/euclio)\
**Post date:** [March 28, 2016, 10:31pm UTC](https://internals.rust-lang.org/t/beta-testing-rustup-rs/3316/14 "2016-03-28T22:31:09Z")

</div>

I’m getting

```rust
$ curl https://sh.rustup.rs -sSf | sh
usage: mktemp [-d] [-q] [-t prefix] [-u] template ...
       mktemp [-d] [-q] [-u] -t prefix
rustup: command failed: mktemp -d
info: downloading installer
mkdir: : No such file or directory
rustup: command failed: mkdir -p

```

on OSX 10.10 after uninstalling multirust with

`$ curl -sf https://raw.githubusercontent.com/brson/multirust/master/blastoff.sh | sh -s -- --uninstall`.

---

<div class="post-metadata">

**Author:** ![SimonSapin](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/simonsapin/32/3158_2.png) [@SimonSapin](https://internals.rust-lang.org/u/SimonSapin)\
**Post date:** [March 28, 2016, 11:23pm UTC](https://internals.rust-lang.org/t/beta-testing-rustup-rs/3316/15 "2016-03-28T23:23:53Z")

</div>

How can I pick a different target directory (instead of `~/.cargo`), and have rustup not mess with my shell config file (I’ll add to `$PATH` myself)? With `https://sh.rustup.rs` my only options seem to be “Continue? (Y/n)”.

---

<div class="post-metadata">

**Author:** ![SimonSapin](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/simonsapin/32/3158_2.png) [@SimonSapin](https://internals.rust-lang.org/u/SimonSapin)\
**Post date:** [March 28, 2016, 11:37pm UTC](https://internals.rust-lang.org/t/beta-testing-rustup-rs/3316/16 "2016-03-28T23:37:37Z")

</div>

The former is controlled by the `CARGO_HOME` environment variable. For the latter I’ve built from source with a change, but a command-line option or environment variable to do this would be nice.

---

<div class="post-metadata">

**Author:** ![brson](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/brson/32/5197_2.png) [@brson](https://internals.rust-lang.org/u/brson)\
**Post date:** [March 29, 2016, 12:10am UTC](https://internals.rust-lang.org/t/beta-testing-rustup-rs/3316/17 "2016-03-29T00:10:41Z")

</div>

> [@steveklabnik](#):
>
> Okay, last post, I swear: I was also then confused when the stable toolchain wasn't installed like it used to be. Dunno if this is good or bad. 😄

@steveklanik

Thanks for testing. There are several things conspiring to make the multirust-\>rustup upgrade not work very well right now, but at least you got through it! That's better than I feared.

One thing to be aware of is that rustup is still using `~/.multirust` for its data. It'll move to `~./rustup` _soon_.

I think I'm going to add an installation step that probes the system for a variety of 'old' configurations and tries to resolve them before installation.

> [@zsiciarz](#):
>
> This program might not have installed correctly

@zsiciarz Do you know what this means? I hope this isn't some weird side-effect of the application containing the word `setup` in the name...

> [@dirvine](#):
>
> multirust upgrade-data (strange step name)

@dirvine Yeah, this is just an error message that needs to change.

> [@mitsuhiko](#):
>
> I'm utterly confused by this. So apparently rustup install nightly is a thing, yet rustup --help shows no commands?

@mitsuhiko No `rustup install` is not a command. Where did you get that impression?

> [@mitsuhiko](#):
>
> Also the curl installation method puts a bunch of stuff into ~/.cargo yet rustup install nightly puts it into /usr/local?!

`rustup` should not be touching `/usr/local`. `rustup install nightly` should install to `~/.multirust/toolchains/nightly` (the directory hasn't been renamed yet).

> [@petrochenkov](#):
>
> After the confirmation Y of Continue? (Y/n) the console window closes very quickly. I noticed some panic message before the window closed, but it disappears too quickly to be read. HKEY\_CURRENT\_USER/Environment/PATH is not updated, some binaries however appear in %USERNAME%.cargo.

Thanks for the report. This is all bad! [Issue](https://github.com/rust-lang-nursery/multirust-rs/issues/181).

I'm not sure if there's something simple we can be doing to lessen the UAC, etc. warnings on Windows.

> [@jimmycuadra](#):
>
> [http://www.rustup.rs/](http://www.rustup.rs/) should 301 redirect to [https://www.rustup.rs/](https://www.rustup.rs/) with the HSTS header.

@jimmycuadra Huh, I thought I set up the redirect, but it's definitely not doing it. [Issue](https://github.com/rust-lang-nursery/multirust-rs/issues/180).

> [@jimmycuadra](#):
>
> The design should match the main Rust website to make it more clear that it's an official way to install Rust. Right now there's no way to know if this is just someone's pet project or if it's official. Perhaps the site should be hosted at [rustup.rust-lang.org](http://rustup.rust-lang.org) or something to make the official distinction very clear.

Yeah, I've been conflicted about how official to make this. When I started on it I wanted it to be clearly unofficial for a while, but the project is on the fast-track to being on official project.

I know that whether this is official is one of the questions people are going to have when asked to install something, so it should be conveyed.

As to giving the website the same style as the Rust website, I'm conflicted. I really did want to take the opportunity to do something new - I've been maintaining that same style on the Rust website for years.

At some point the main website will be redesigned to incorporate rustup, and that will hopefully obsolete the rustup website.

As to hosting at `rustup.rust-lang.org`, the main reason I didn't do that is to give `rustup` space to grow as an unofficial project before it has to deal with the commitments of being _the_ rust installer. It also enables the cute `win.rustup.rs` and `sh.rustup.rs` domains.

Anyway, I'm open to dropping the rustup domain.

> [@aturon](#):
>
> which I dutifully did. But it seems the actual dir needed is ~/.cargo/bin (missing the /bin above).

Good catch! [Issue](https://github.com/rust-lang-nursery/multirust-rs/issues/182).

> [@aturon](#):
>
> So I ignored your instructions to uninstall Rust first, and got:

I suspect this happened because the `multirust` you ran was actually the old multirust shell script, which happily did a no-op upgrade.

I'll put more defensive measures into the upgrade to prevent these things.

> [@euclio](#):
>
> rustup: command failed: mktemp -d

@euclio Damn. When I was writing this script I had a nagging recollection that it's hard to use `mktemp` compatibly. Should be an easy fix. [Issue](https://github.com/rust-lang-nursery/multirust-rs/issues/183).

> [@SimonSapin](#):
>
> How can I pick a different target directory (instead of ~/.cargo), and have rustup not mess with my shell config file (I’ll add to $PATH myself)? With [https://sh.rustup.rs](https://sh.rustup.rs) my only options seem to be "Continue? (Y/n)".

Right now I don't intend to allow installation to non-cargo directories - part of the intent with the design is to double-down on `~/.cargo/bin` as the place for all rust binaries. We really want to steer people to have it in their `PATH`. You can though set `CARGO_HOME` to tell `rustup-setup` where this directory is.

Disabling `PATH` modification is not implemented yet. [Issue](https://github.com/rust-lang-nursery/multirust-rs/issues/170).

---

<div class="post-metadata">

**Author:** ![brson](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/brson/32/5197_2.png) [@brson](https://internals.rust-lang.org/u/brson)\
**Post date:** [March 29, 2016, 12:11am UTC](https://internals.rust-lang.org/t/beta-testing-rustup-rs/3316/18 "2016-03-29T00:11:32Z")

</div>

Thanks for the testing so far everyone! It’s been really helpful. I’ll do my best to resolve the issues you’ve seen this week.

---

<div class="post-metadata">

**Author:** ![steveklabnik](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/steveklabnik/32/4524_2.png) [@steveklabnik](https://internals.rust-lang.org/u/steveklabnik)\
**Post date:** [March 29, 2016, 4:11am UTC](https://internals.rust-lang.org/t/beta-testing-rustup-rs/3316/19 "2016-03-29T04:11:28Z")

</div>

FWIW, I also kind of assumed there’d be an install command. Typing “update” to install a thing feels a bit strange, but my brain glossed over it.

---

<div class="post-metadata">

**Author:** ![msiemens](https://sea2.discourse-cdn.com/flex002/user_avatar/internals.rust-lang.org/msiemens/32/288_2.png) [@msiemens](https://internals.rust-lang.org/u/msiemens)\
**Post date:** [March 29, 2016, 4:33am UTC](https://internals.rust-lang.org/t/beta-testing-rustup-rs/3316/20 "2016-03-29T04:33:56Z")

</div>

I just installed the latest rustup/multirust on my Windows 7 machine. It’s working so far. What’s interesting though is that now all rustup-related files are stored in `C:\Users\<username>\.cargo` and `C:\Users\<username>\.multirust` while completely ignoring old files from `C:\Users\<username>\AppData\Local\.multirust`. Related to that, is it on purpose that files are stored in the home folder instead of `AppData\Local`?

[Next page](https://internals.rust-lang.org/t/beta-testing-rustup-rs/3316.md?page=2)
