1
1
---
2
2
layout: zh-CN/default
3
- title: Installation · The Rust Programming Language
3
+ title: 安装 · Rust 程序设计语言
4
4
---
5
5
< h1 class ="rustup "> 安装 Rust</ h1 >
6
6
7
7
< div class ="row rustup-row ">
8
8
< div class ="col-md-8 instr-column ">
9
9
< div id ="platform-instructions-unix " class ="instructions " style ="display: none; ">
10
- < p > To install Rust, run the following in your terminal, then follow the onscreen instructions. </ p >
10
+ < p > 要安装 Rust 时,请在终端中运行以下命令,然后按照屏幕上的提示进行操作。 </ p >
11
11
< pre > curl https://sh.rustup.rs -sSf | sh</ pre >
12
12
</ div >
13
13
@@ -22,30 +22,30 @@ <h1 class="rustup">安装 Rust</h1>
22
22
< div id ="platform-instructions-android " class ="instructions " style ="display: none; ">
23
23
< p > 您似乎正在安卓(Android)操作系统上浏览本页面</ p >
24
24
< p >
25
- The Rust compiler does not run on Android directly (yet),
26
- but it does make it easy to cross-compile < em > to </ em > Android.
27
- Install Rust on a supported host platform and
25
+ Rust 编译器(暂时)不能直接在安卓(Android)上运行,
26
+ 但它确实使得它很容易交叉编译 < em > 到 </ em > 安卓( Android)上。
27
+ 请在支持的主机平台上安装 Rust ,
28
28
< a href ="https://github.com/rust-lang-nursery/rustup.rs/#cross-compilation ">
29
- follow the cross-compilation instructions
29
+ 遵循交叉编译指令
30
30
</ a >
31
- to build Rust applications for Android.
31
+ 来构建安卓(Android)平台的 Rust 应用程序。
32
32
</ p >
33
33
</ div >
34
34
35
35
< div id ="platform-instructions-unknown " class ="instructions " style ="display: none; ">
36
36
<!-- unrecognized platform: ask for help -->
37
- < p > I don't recognize your platform. </ p >
37
+ < p > 无法识别您的平台 </ p >
38
38
< p >
39
- Rust runs on Windows, Linux, Mac OS X, FreeBSD and NetBSD. If
40
- you are on one of these platforms and are seeing this then please
41
- < a href ="https://github.com/rust-lang/rust-www/issues/new "> report an issue</ a > ,
42
- along with the following values:
39
+ 可以运行在 Windows, Linux, Mac OS X, FreeBSD 和 NetBSD 上。
40
+ 如果您正在这些平台上,并且看到这句话,请您
41
+ < a href ="https://github.com/rust-lang/rust-www/issues/new "> 报告问题( issue) </ a > ,
42
+ 并且提供以下信息:
43
43
</ p >
44
44
45
45
< div >
46
- < div > navigator.platform:</ div >
46
+ < div > navigator.platform:(浏览器.平台) </ div >
47
47
< div id ="nav-plat "> </ div >
48
- < div > navigator.appVersion:</ div >
48
+ < div > navigator.appVersion:(浏览器.版本) </ div >
49
49
< div id ="nav-app "> </ div >
50
50
</ div >
51
51
@@ -97,30 +97,30 @@ <h1 class="rustup">安装 Rust</h1>
97
97
< br >
98
98
99
99
< a id ="platform-button " style ="display: none; " href ="# ">
100
- click or press "n" to cycle platforms
100
+ 点击或按下 “n” 键更换平台
101
101
</ a >
102
102
</ div >
103
103
</ div >
104
104
105
105
</ div >
106
106
107
- < h2 > Notes about Rust installation </ h2 >
107
+ < h2 > 关于 Rust 安装的注意事项 </ h2 >
108
108
109
109
< div class ="row ">
110
110
< div class ="col-md-12 ">
111
111
112
- < h3 > Toolchain management with < code > rustup</ code > </ h3 >
112
+ < h3 > 使用 < code > rustup</ code > 管理工具链 </ h3 >
113
113
114
114
< p >
115
- Rust is installed and managed by the
115
+ Rust 由
116
116
< a href ="https://github.com/rust-lang-nursery/rustup.rs "> < code > rustup</ code > </ a >
117
- tool. Rust has a 6-week
117
+ 工具来安装和管理。 Rust有一个6周的
118
118
< a href ="https://github.com/rust-lang/rfcs/blob/master/text/0507-release-channels.md ">
119
- rapid release process
120
- </ a > and supports a
119
+ 快速发布过程
120
+ </ a > 并且支持
121
121
< a href ="https://forge.rust-lang.org/platform-support.html ">
122
- great number of platforms
123
- </ a > , so there are many builds of Rust available at any time.
122
+ 大量的平台
123
+ </ a > ,所以任何时候都有很多Rust构建可用。
124
124
< code > rustup</ code > manages these builds in a consistent way on every
125
125
platform that Rust supports, enabling installation of Rust from the
126
126
beta and nightly release channels as well as support for additional
@@ -133,18 +133,18 @@ <h3>Toolchain management with <code>rustup</code></h3>
133
133
documentation</ a > .
134
134
</ p >
135
135
136
- < h3 > Configuring the < code > PATH</ code > environment variable </ h3 >
136
+ < h3 > 配置 < code > PATH</ code > 环境变量 </ h3 >
137
137
138
138
< p >
139
- In the Rust development environment, all tools are installed to the
139
+ 在 Rust 开发环境中,所有工具都安装到
140
140
< span class ="platform-specific not-win " style ="display: inline; ">
141
141
< code > ~/.cargo/bin</ code >
142
142
</ span >
143
143
< span class ="platform-specific win " style ="display: none; ">
144
144
< code > %USERPROFILE%\.cargo\bin</ code >
145
- </ span > directory,
146
- and this is where you will find the Rust toolchain, including
147
- < code > rustc</ code > , < code > cargo</ code > , and < code > rustup</ code > .
145
+ </ span > 目录,
146
+ 并且您能够在这里找到 Rust 工具链,包括
147
+ < code > rustc</ code > 、 < code > cargo</ code > 及 < code > rustup</ code > 。
148
148
</ p >
149
149
150
150
< p >
@@ -160,13 +160,12 @@ <h3>Configuring the <code>PATH</code> environment variable</h3>
160
160
</ p >
161
161
162
162
< p >
163
- If, after installation, running < code > rustc --version</ code > in the
164
- console fails, this is the most likely reason.
163
+ 当安装完成之后,如果在控制台运行 < code > rustc --version</ code > 失败,这是最可能的原因。
165
164
</ p >
166
165
167
166
< div class ="platform-specific win ">
168
167
169
- < h3 > Windows considerations </ h3 >
168
+ < h3 > Windows 注意事项 </ h3 >
170
169
<!-- This anchor is probably linked in the wild and should not be broken -->
171
170
< a id ="win-foot "> </ a >
172
171
@@ -194,16 +193,14 @@ <h3>Windows considerations</h3>
194
193
</ div >
195
194
</ div >
196
195
197
- < h2 > Other installation methods </ h3 >
196
+ < h2 > 其他安装方法 </ h3 >
198
197
199
198
< div class ="row ">
200
199
< div class ="col-md-12 ">
201
200
< p >
202
- The installation described above, via
203
- < code > rustup</ code > , is the preferred way to install Rust for most developers,
204
- but Rust can be
205
- < a href ="other-installers.html "> installed via other methods</ a >
206
- as well.
201
+ 上述的通过 < code > rustup</ code > 的安装方法是大多数开发者的首选。
202
+ 但是 Rust 也可以
203
+ < a href ="other-installers.html "> 通过其他方法安装</ a > 。
207
204
</ p >
208
205
</ div >
209
206
</ div >
0 commit comments