Skip to content

Commit fb74ee8

Browse files
committed
add rustup.md
1 parent 6ca68b5 commit fb74ee8

File tree

1 file changed

+33
-0
lines changed

1 file changed

+33
-0
lines changed

pages.zh/common/rustup.md

Lines changed: 33 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,33 @@
1+
# rustup
2+
3+
> 安装、管理和更新 Rust 工具链。
4+
> 一些子命令,如 `toolchain``target``update` 等有自己的使用文档。
5+
> 更多信息:<https://rust-lang.github.io/rustup>.
6+
7+
- 为你的系统安装 nightly 工具链:
8+
9+
`rustup install nightly`
10+
11+
- 将默认工具链切换为 nightly 以便 `cargo``rustc` 命令使用它:
12+
13+
`rustup default nightly`
14+
15+
- 在当前项目中使用 nightly 工具链,但保持全局设置不变:
16+
17+
`rustup override set nightly`
18+
19+
- 更新所有工具链:
20+
21+
`rustup update`
22+
23+
- 列出已安装的工具链:
24+
25+
`rustup show`
26+
27+
- 使用指定工具链运行 `cargo build`
28+
29+
`rustup run {{工具链}} cargo build`
30+
31+
- 在默认网页浏览器中打开本地 Rust 文档:
32+
33+
`rustup doc`

0 commit comments

Comments
 (0)