rust

Regular install Behind a proxy install Configure Cargo w/ proxy

How to install Rust on Windows

The recommended installation method for Windows is through the RUSTUP-INIT.EXE tool.

The setup will first ask if you want to customize the intallation. Select the default values by typing “1”.

windows_install_1

If you run into the following errors you might be behid a proxy: “could not download file (…)”, “error during download”, “Couldn’t resolve host name”. See the next section for details.

How to install Rust on Windows behind a proxy

If you are behind a proxy, first download the RUSTUP-INIT.EXE tool from the official Rust site.

Now, before executing the tool you must configure the proxy in a PowerShell instance:

> $proxy='http://<IP>:<PORT>'

Depending on your network configuration you will have to specify your domain, user and password:

> $proxy='http://<DOMAIN>%5C<USER>:<PASSWORD>@<IP>:<PORT>'

Note that %5C is the code for backslash.

Finally update the ENV variable and execute the tool:

> $ENV:HTTP_PROXY=$proxy 
> $ENV:HTTPS_PROXY=$proxy
> .\rustup-init.exe

windows_install_proxy_1

Now you can proceed as a regular installation. You might also want to configure Cargo to work with your proxy.