This repository was archived by the owner on Sep 30, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 340
/
Copy pathinstall.html
202 lines (168 loc) · 7.43 KB
/
install.html
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
---
layout: default
title: Installation · The Rust Programming Language
---
<h1 class="rustup">Install Rust</h1>
<div class="row rustup-row">
<div class="col-md-8 instr-column">
<div id="platform-instructions-unix" class="instructions" style="display: none;">
<p>To install Rust, run the following in your terminal, then follow the onscreen instructions.</p>
<pre>curl https://sh.rustup.rs -sSf | sh</pre>
</div>
<div id="platform-instructions-win" class="instructions" style="display: none;">
<p>
To install Rust, download and run
<a href="https://win.rustup.rs">rustup‑init.exe</a>
then follow the onscreen instructions.
</p>
<p>If you're a Windows Subsystem for Linux user run the following in your terminal, then follow the onscreen instructions to install Rust.</p>
<pre>curl https://sh.rustup.rs -sSf | sh</pre>
</div>
<div id="platform-instructions-unknown" class="instructions" style="display: none;">
<!-- unrecognized platform: ask for help -->
<p>I don't recognize your platform.</p>
<p>
Rust runs on Windows, Linux, Mac OS X, FreeBSD and NetBSD. If
you are on one of these platforms and are seeing this then please
<a href="https://github.com/rust-lang/rust-www/issues/new">report an issue</a>,
along with the following values:
</p>
<div>
<div>navigator.platform:</div>
<div id="nav-plat"></div>
<div>navigator.appVersion:</div>
<div id="nav-app"></div>
</div>
<!-- duplicate the default cross-platform instructions -->
<div>
<p>To install Rust, if you are running Unix,<br/>run the following
in your terminal, then follow the onscreen instructions.</p>
<pre>curl https://sh.rustup.rs -sSf | sh</pre>
</div>
<hr/>
<div>
<p>
If you are running Windows,<br/>download and run
<a href="https://win.rustup.rs">rustup‑init.exe</a>
then follow the onscreen instructions.
</p>
</div>
</div>
<div id="platform-instructions-default" class="instructions">
<div>
<p>To install Rust, if you are running Unix,<br/>run the following
in your terminal, then follow the onscreen instructions.</p>
<pre>curl https://sh.rustup.rs -sSf | sh</pre>
</div>
<hr/>
<div>
<p>
If you are running Windows,<br/>download and run
<a href="https://win.rustup.rs">rustup‑init.exe</a>
then follow the onscreen instructions.
</p>
</div>
</div>
</div>
<div class="col-md-4 release-info-column">
<div>
<div class="release-version">Rust <span>{{ site.stable }}</span></div>
<a href="{{ site.stable_blog }}">
<div class="release-date">{{ site.stable_date | date: "%B %-d, %Y" }}</div>
</a>
<br>
<a id="platform-button" style="display: none;" href="#">
click or press "n" to cycle platforms
</a>
</div>
</div>
</div>
<h2>Notes about Rust installation</h2>
<div class="row">
<div class="col-md-12">
<h3>Toolchain management with <code>rustup</code></h3>
<p>
Rust is installed and managed by the
<a href="https://github.com/rust-lang-nursery/rustup.rs"><code>rustup</code></a>
tool. Rust has a 6-week
<a href="https://github.com/rust-lang/rfcs/blob/master/text/0507-release-channels.md">
rapid release process
</a> and supports a
<a href="https://forge.rust-lang.org/platform-support.html">
great number of platforms</a>, so there are many builds of Rust available at any time.
<code>rustup</code> manages these builds in a consistent way on every
platform that Rust supports, enabling installation of Rust from the
beta and nightly release channels as well as support for additional
cross-compilation targets.
</p>
<p>
For more information see the
<a href="https://github.com/rust-lang-nursery/rustup.rs/blob/master/README.md"><code>rustup</code>
documentation</a>.
</p>
<h3>Configuring the <code>PATH</code> environment variable</h3>
<p>
In the Rust development environment, all tools are installed to the
<span class="platform-specific not-win" style="display: inline;">
<code>~/.cargo/bin</code>
</span>
<span class="platform-specific win" style="display: none;">
<code>%USERPROFILE%\.cargo\bin</code>
</span> directory,
and this is where you will find the Rust toolchain, including
<code>rustc</code>, <code>cargo</code>, and <code>rustup</code>.
</p>
<p>
Accordingly, it is customary for Rust developers to include this
directory in their
<a href="https://en.wikipedia.org/wiki/PATH_(variable)"><code>PATH</code>
environment variable</a>. During installation <code>rustup</code>
will attempt to configure the
<code>PATH</code>. Because of differences between platforms,
command shells, and bugs in <code>rustup</code>, the modifications
to <code>PATH</code> may not take effect until the console is
restarted, or the user is logged out, or it may not succeed at all.
</p>
<p>
If, after installation, running <code>rustc --version</code> in the
console fails, this is the most likely reason.
</p>
<div class="platform-specific win">
<h3>Windows considerations</h3>
<!-- This anchor is probably linked in the wild and should not be broken -->
<a id="win-foot"></a>
<p>
On Windows, Rust additionally requires the C++ build tools
for Visual Studio 2013 or later. The easiest way to acquire the build
tools is by installing
<a href="https://www.visualstudio.com/downloads/#build-tools-for-visual-studio-2017">
Microsoft Visual C++ Build Tools 2017
</a>
which provides just the Visual C++ build tools. Alternately, you
can <a href="https://www.visualstudio.com/downloads/">install</a>
Visual Studio 2017, Visual Studio 2015, or Visual Studio 2013 and during install select
the "C++ tools".
</p>
<p>
For further information about configuring Rust on Windows see the
<a href="https://github.com/rust-lang-nursery/rustup.rs/blob/master/README.md#working-with-rust-on-windows">Windows-specific <code>rustup</code>
documentation</a>.
</p>
</div>
</div>
</div>
<h2>Other installation methods</h2>
<div class="row">
<div class="col-md-12">
<p>
The installation described above, via
<code>rustup</code>, is the preferred way to install Rust for most developers.
However, Rust can be
<a href="other-installers.html">installed via other methods</a>
as well.
</p>
</div>
</div>
<script type="text/javascript">
{% include rustup.js %}
</script>