2
2
layout: default
3
3
title: Installation · The Rust Programming Language
4
4
---
5
+ < h1 class ="rustup "> Install Rust</ h1 >
6
+
7
+ < hr >
8
+
5
9
< div class ="row rustup-row ">
6
10
< div class ="col-md-8 instr-column ">
7
11
< div id ="platform-instructions-unix " class ="instructions " style ="display: none; ">
35
39
< p >
36
40
Rust runs on Windows, Linux, Mac OS X, FreeBSD and NetBSD. If
37
41
you are on one of these platforms and are seeing this then please
38
- < a href ="https://github.com/rust-lang-nursery/rustup.rs /issues/new "> report an issue</ a > ,
42
+ < a href ="https://github.com/rust-lang/rust-www /issues/new "> report an issue</ a > ,
39
43
along with the following values:
40
44
< div >
41
45
< div > navigator.platform:</ div >
68
72
69
73
< div class ="col-md-4 release-info-column ">
70
74
< div >
71
- < br >
72
-
73
- < div > Current release</ div >
74
- < div class ="release-version "> {{ site.stable }}</ div >
75
+ < div class ="release-version "> Rust < span > {{ site.stable }}</ span > </ div >
75
76
< a href ="{{ site.stable_blog }} ">
76
77
< div class ="release-date "> {{ site.stable_date | date: "%B %-d, %Y" }}</ div >
77
78
</ a >
86
87
87
88
</ div >
88
89
89
- < h1 class ="rustup "> Installing Rust</ h1 >
90
-
91
- < div class ="row ">
92
- < div class ="col-md-12 ">
93
- < p >
94
- The most common way to install Rust is to ↑ < em > follow the
95
- instructions above</ em > ↑. The installer will explain everything it
96
- does, and everything you need to set up your environment. It's
97
- simple, and it usually just works. If you are confident and
98
- clever then ↑ < em > follow the instructions above</ em > ↑. If you are
99
- cautious or have questions, read on.
100
- </ p >
101
-
102
- < p >
103
- Follow the instructions above.
104
- Doing so will install the latest stable release of Rust,
105
- including the compiler, < code > rustc</ code > , the build system and
106
- package manager, < code > cargo</ code > , and the Rust toolchain
107
- manager, < code > rustup</ code > , to Cargo's application directory,
108
- < span class ="platform-specific not-win " style ="display: inline; ">
109
- < code > ~/.cargo/bin</ code >
110
- </ span >
111
- < span class ="platform-specific win " style ="display: none; ">
112
- < code > %USERPROFILE%\.cargo\bin</ code >
113
- </ span >
114
- .
115
- </ p >
116
- </ div >
117
- </ div >
118
-
119
- < div class ="install-examples ">
120
- < div class ="row install-example-row ">
121
- < div class ="col-md-4 ">
122
- < p > Test the installation by running</ p >
123
- </ div >
124
- < div class ="col-md-6 ">
125
- < pre class ="platform-specific not-win " style ="display: inline; "> ~/.cargo/bin/rustc --version</ pre >
126
- < pre class ="platform-specific win " style ="display: inline; "> %USERPROFILE%\.cargo\bin\rustc --version</ pre >
127
- </ div >
128
- </ div >
129
-
130
- < div class ="row install-example-row ">
131
- < div class ="col-md-4 ">
132
- < p > ... which should print</ p >
133
- </ div >
134
- < div class ="col-md-6 ">
135
- < pre > {{ site.stable_full_version }}</ pre >
136
- </ div >
137
- </ div >
138
-
139
- < div class ="row install-example-row ">
140
- < div class ="col-md-4 ">
141
- < p > To uninstall Rust, run</ p >
142
- </ div >
143
- < div class ="col-md-6 ">
144
- < pre class ="platform-specific not-win " style ="display: inline; "> ~/.cargo/bin/rustup self uninstall</ pre >
145
- < pre class ="platform-specific win " style ="display: inline; "> %USERPROFILE%\.cargo\bin\rustup self uninstall</ pre >
146
- </ div >
147
- </ div >
148
- </ div >
149
-
150
- < div class ="row ">
151
- < div class ="col-md-12 ">
152
- < p >
153
- If you run into problems see the
154
- < a href ="TODO "> troubleshooting guide</ a > .
155
- </ p >
156
- </ div >
157
- </ div >
158
-
159
90
< h2 > Notes about Rust installation</ h2 >
160
91
161
92
< div class ="row ">
@@ -173,28 +104,22 @@ <h3>Toolchain management with <code>rustup</code></h3>
173
104
< a href ="https://forge.rust-lang.org/platform-support.html ">
174
105
great number of platforms
175
106
</ a > , so there are many builds of Rust available at any time.
176
- < code > rustup</ code > manages these builds in a consistent way on every platform
177
- that Rust supports, enabling
178
- < a href ="https://github.com/rust-lang-nursery/rustup.rs#working-with-nightly-rust ">
179
- installation of Rust from the beta and nightly release channels
180
- </ a >
181
- as well as
182
- < a href ="https://github.com/rust-lang-nursery/rustup.rs#cross-compilation ">
183
- support for additional cross-compilation targets
184
- </ a > .
107
+ < code > rustup</ code > manages these builds in a consistent way on every
108
+ platform that Rust supports, enabling installation of Rust from the
109
+ beta and nightly release channels as well as support for additional
110
+ cross-compilation targets
185
111
</ p >
186
112
187
113
< p >
188
- To keep your Rust installation up to date, periodically
189
- run < code > rustup update </ code > . For more information see the
190
- < a href =" https://github.com/rust-lang-nursery/rustup.rs " > < code > rustup </ code > documentation</ a > .
114
+ For more information see the
115
+ < a href =" https://github.com/rust-lang-nursery/rustup.rs/blob/master/README.md " > < code > rustup</ code >
116
+ documentation</ a > .
191
117
</ p >
192
118
193
119
< h3 > Configuring the < code > PATH</ code > environment variable</ h3 >
194
120
195
121
< p >
196
- In the Rust development environment, all tools are installed
197
- to < code > cargo</ code > 's
122
+ In the Rust development environment, all tools are installed to the
198
123
< span class ="platform-specific not-win " style ="display: inline; ">
199
124
< code > ~/.cargo/bin</ code >
200
125
</ span >
@@ -212,16 +137,14 @@ <h3>Configuring the <code>PATH</code> environment variable</h3>
212
137
environment variable</ a > . During installation, < code > rustup</ code > ,
213
138
will attempt to configure
214
139
< code > PATH</ code > , but because of differences between platforms,
215
- command shells, and bugs in < code > rustup</ code > the modifications
140
+ command shells, and bugs in < code > rustup</ code > , the modifications
216
141
to < code > PATH</ code > may not take effect until the console is
217
142
restarted, or the user logged out, or may not succeed at all.
218
143
</ p >
219
144
220
145
< p >
221
146
If, after installation, running < code > rustc --version</ code > in the
222
- console fails, this is the most likely reason. Follow the
223
- < a href ="TODO "> platform-specific instructions</ a > to
224
- modify < code > PATH</ code > yourself.
147
+ console fails, this is the most likely reason.
225
148
</ p >
226
149
227
150
< div class ="platform-specific win ">
@@ -231,52 +154,43 @@ <h3>Windows considerations</h3>
231
154
< a id ="win-foot "> </ a >
232
155
233
156
< p >
234
- There are two prominent
235
- < a href ="https://en.wikipedia.org/wiki/Application_binary_interface "> ABIs</ a >
236
- in use on Windows: the native (MSVC) ABI used by
237
- < a href ="https://www.visualstudio.com "> Visual Studio</ a > ,
238
- and the GNU ABI used by the
239
- < a href ="https://gcc.gnu.org/ "> GCC toolchain</ a > .
240
- Rust can compile for both ABIs, and which one you choose to target
241
- depends largely on what C/C++ libraries you want to interoperate with:
242
- for interop with software produced by Visual Studio use the MSVC build
243
- of Rust; for interop with GNU software built using the
244
- < a href ="https://msys2.github.io/ "> MinGW/MSYS2 toolchain</ a >
245
- use the GNU build.
246
- </ p >
247
-
248
- < p >
249
- For best interoperability with other Windows software, Rust targets
250
- the MSVC ABI by default. For this Rust requires the C++ build tools
157
+ On Windows, Rust additionally requires the C++ build tools
251
158
for Visual Studio 2013 or later. The easiest way to acquire the build
252
159
tools is by installing
253
160
< a href ="http://landinghub.visualstudio.com/visual-cpp-build-tools ">
254
- Microsoft Visual C++ Build Tools 2015</ a >
255
- which provides just the Visual C++ build tools.
256
- Alternately, you can < a href ="https://www.visualstudio.com/downloads/ "> install</ a >
257
- Visual Studio 2015 or Visual Studio 2013 and during install select the "C++ tools".
258
- No additional software installation is necessary for basic use of the GNU build.
161
+ Microsoft Visual C++ Build Tools 2015
162
+ </ a >
163
+ which provides just the Visual C++ build tools. Alternately, you
164
+ can < a href ="https://www.visualstudio.com/downloads/ "> install</ a >
165
+ Visual Studio 2015 or Visual Studio 2013 and during install select
166
+ the "C++ tools".
259
167
</ p >
260
168
261
169
< p >
262
170
For further information about configuring Rust on Windows see the
263
- < a href ="TODO "> Windows-specific < code > rustup</ code > documentation</ a > .
171
+ < a href ="https://github.com/rust-lang-nursery/rustup.rs/blob/master/README.md#working-with-rust-on-windows "> Windows-specific < code > rustup</ code >
172
+ documentation</ a > .
264
173
</ p >
265
174
266
175
</ div >
267
176
268
- < h3 > Other installation methods</ h3 >
177
+ </ div >
178
+ </ div >
179
+
180
+ < h2 > Other installation methods</ h3 >
269
181
182
+ < div class ="row ">
183
+ < div class ="col-md-12 ">
270
184
< p >
271
185
The installation described above, via
272
186
< code > rustup</ code > , is the preferred way to install Rust for most developers,
273
187
but Rust can be
274
- < a href ="other-installers.html "> installed via other methods as well</ a > .
188
+ < a href ="other-installers.html "> installed via other methods</ a >
189
+ as well.
275
190
</ p >
276
-
277
191
</ div >
278
192
</ div >
279
-
193
+
280
194
< script type ="text/javascript ">
281
195
{ % include rustup . js % }
282
196
</ script >
0 commit comments