@@ -111,41 +111,40 @@ unofficial locations.
111
111
Note that this table can be expanded over time, this isn't the exhaustive set of
112
112
tier 3 platforms that will ever be!
113
113
114
- ## Installing on Linux or Mac
114
+ ## Installing Rust
115
115
116
- If we're on Linux or a Mac, all we need to do is open a terminal and type this:
116
+ All you need to do on Unix systems like Linux and macOS is open a
117
+ terminal and type this:
117
118
118
119
``` bash
119
- $ curl -sSf https://static.rust-lang.org/ rustup.sh | sh
120
+ $ curl https://sh. rustup.rs -sSf | sh
120
121
```
121
122
122
- This will download a script, and start the installation. If it all goes well,
123
- you’ll see this appear:
123
+ It will download a script, and start the installation. If everything
124
+ goes well, you’ll see this appear:
124
125
125
126
``` text
126
- Rust is ready to roll.
127
+ Rust is installed now. Great!
127
128
```
128
129
129
- From here, press ` y ` for ‘yes’, and then follow the rest of the prompts.
130
+ Installing on Windows is nearly as easy: download and run
131
+ [ rustup-init.exe] . It will start the installation in a console and
132
+ present the above message on success.
130
133
131
- ## Installing on Windows
134
+ For other installation options and information, visit the [ install]
135
+ page of the Rust website.
132
136
133
- If you're on Windows, please download the appropriate [ installer] [ install-page ] .
134
-
135
- [ install-page ] : https://www.rust-lang.org/install.html
137
+ [ rustup-init.exe ] : https://win.rustup.rs
138
+ [ install ] : https://www.rust-lang.org/install.html
136
139
137
140
## Uninstalling
138
141
139
- Uninstalling Rust is as easy as installing it. On Linux or Mac, run
140
- the uninstall script:
142
+ Uninstalling Rust is as easy as installing it:
141
143
142
144
``` bash
143
- $ sudo /usr/local/lib/rustlib/ uninstall.sh
145
+ $ rustup self uninstall
144
146
```
145
147
146
- If we used the Windows installer, we can re-run the ` .msi ` and it will give us
147
- an uninstall option.
148
-
149
148
## Troubleshooting
150
149
151
150
If we've got Rust installed, we can open up a shell, and type this:
@@ -158,12 +157,15 @@ You should see the version number, commit hash, and commit date.
158
157
159
158
If you do, Rust has been installed successfully! Congrats!
160
159
161
- If you don't and you're on Windows, check that Rust is in your %PATH% system
162
- variable: ` $ echo %PATH% ` . If it isn't, run the installer again, select "Change"
163
- on the "Change, repair, or remove installation" page and ensure "Add to PATH" is
164
- installed on the local hard drive. If you need to configure your path manually,
165
- you can find the Rust executables in a directory like
166
- ` "C:\Program Files\Rust stable GNU 1.x\bin" ` .
160
+ If you don't, that probably means that the ` PATH ` environment variable
161
+ doesn't include Cargo's binary directory, ` ~/.cargo/bin ` on Unix, or
162
+ ` %USERPROFILE%\.cargo\bin ` on Windows. This is the directory where
163
+ Rust development tools live, and most Rust developers keep it in their
164
+ ` PATH ` environment variable, which makes it possible to run ` rustc ` on
165
+ the command line. Due to differences in operating systems, command
166
+ shells, and bugs in installation, you may need to restart your shell,
167
+ log out of the system, or configure ` PATH ` manually as appropriate for
168
+ your operating environment.
167
169
168
170
Rust does not do its own linking, and so you’ll need to have a linker
169
171
installed. Doing so will depend on your specific system. For
@@ -193,9 +195,7 @@ resources include [the user’s forum][users] and [Stack Overflow][stackoverflow
193
195
[ stackoverflow ] : http://stackoverflow.com/questions/tagged/rust
194
196
195
197
This installer also installs a copy of the documentation locally, so we can
196
- read it offline. On UNIX systems, ` /usr/local/share/doc/rust ` is the location.
197
- On Windows, it's in a ` share/doc ` directory, inside the directory to which Rust
198
- was installed.
198
+ read it offline. It's only a ` rustup doc ` away!
199
199
200
200
# Hello, world!
201
201
0 commit comments