Skip to content

Commit

Permalink
Auto merge of #1024 - sjmarshy:document-cargo-home-and-rustup-home, r…
Browse files Browse the repository at this point in the history
…=Diggsey

Document installing to a custom location using CARGO_HOME and RUSTUP_HOME environment variables

This should Fix #994

Add a section `Choosing where to install` to the `install` section of the README discussing the
use of `CARGO_HOME` and `RUSTUP_HOME`
  • Loading branch information
bors committed Apr 2, 2017
2 parents af52e4d + 205608c commit 33e6b1f
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,22 @@ For `zsh`, you must then add the following line in your `~/.zshrc` before
fpath+=~/.zfunc
```

#### Choosing where to install

`rustup` allows you to customise your installation by setting the environment
variables `CARGO_HOME` and `RUSTUP_HOME` before running the `rustup-init`
executable. As mentioned in the [Environment Variables] section, `RUSTUP_HOME`
sets the root rustup folder, which is used for storing installed
toolchains and configuration options. `CARGO_HOME` contains cache files used
by [cargo].

Note that you will need to ensure these environment variables are always
set and that `CARGO_HOME/bin` is in the `$PATH` environment variable when
using the toolchain.

[Environment Variables]: #environment-variables
[cargo]: https://github.com/rust-lang/cargo

## How rustup works

`rustup` is a *toolchain multiplexer*. It installs and manages many
Expand Down

0 comments on commit 33e6b1f

Please sign in to comment.