mirror of
https://github.com/tuna/mirror-web.git
synced 2025-12-31 19:52:48 +00:00
Merge remote-tracking branch 'pull2/master'
Signed-off-by: 王邈 <shankerwangmiao@gmail.com>
This commit is contained in:
commit
bed48ea3e3
|
|
@ -0,0 +1,39 @@
|
|||
---
|
||||
category: help
|
||||
layout: help
|
||||
mirrorid: rustup
|
||||
---
|
||||
|
||||
# Rustup 镜像安装帮助
|
||||
|
||||
[Rustup](https://rustup.rs/) 是 Rust 官方的跨平台 Rust 安装工具。
|
||||
|
||||
使用 rustup 安装 rust 时,若要启用 TUNA 源,执行:
|
||||
|
||||
|
||||
```bash
|
||||
$ # for bash
|
||||
$ RUSTUP_DIST_SERVER=https://mirrors.tuna.tsinghua.edu.cn/rustup rustup install stable # for stable
|
||||
$ # for fish
|
||||
$ env RUSTUP_DIST_SERVER=https://mirrors.tuna.tsinghua.edu.cn/rustup rustup install stable # for stable
|
||||
$ # for bash
|
||||
$ RUSTUP_DIST_SERVER=https://mirrors.tuna.tsinghua.edu.cn/rustup rustup install nightly # for nightly
|
||||
$ # for fish
|
||||
$ env RUSTUP_DIST_SERVER=https://mirrors.tuna.tsinghua.edu.cn/rustup rustup install nightly # for nightly
|
||||
$ # for bash
|
||||
$ RUSTUP_DIST_SERVER=https://mirrors.tuna.tsinghua.edu.cn/rustup rustup install nightly-2019-02-15 # for nightly since 2019.02.15
|
||||
$ # for fish
|
||||
$ env RUSTUP_DIST_SERVER=https://mirrors.tuna.tsinghua.edu.cn/rustup rustup install nightly-2019-02-15 # for nightly since 2019.02.15
|
||||
```
|
||||
|
||||
若要长期启用 TUNA 源,执行:
|
||||
|
||||
```bash
|
||||
$ # for bash
|
||||
$ echo 'export RUSTUP_DIST_SERVER=https://mirrors.tuna.tsinghua.edu.cn/rustup' >> ~/.bash_profile
|
||||
$ # for fish
|
||||
$ echo 'set -x RUSTUP_DIST_SERVER https://mirrors.tuna.tsinghua.edu.cn/rustup' >> ~/.config/fish/config.fish
|
||||
```
|
||||
|
||||
注:rustup 在判断是否需要更新时依赖于 toml 的 sha256 ,由于 toml 内容中相关链接被替换为 TUNA 源,第一次切换到 TUNA 源时各个 channel 会被认为需要更新。
|
||||
|
||||
Loading…
Reference in New Issue