Skip to content

Commit 709b67f

Browse files
committed
Introduce rust-toolchain
Make use of the new format, introduced in https://blog.rust-lang.org/2020/11/27/Rustup-1.23.0.html#new-format-for-rust-toolchain
1 parent 6eafd7c commit 709b67f

File tree

3 files changed

+14
-23
lines changed

3 files changed

+14
-23
lines changed

README.CN.md

Lines changed: 4 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -52,26 +52,19 @@ _带上我最诚挚的问候,<br>Andre ([@andre-richter])_
5252
3. 安装正确的`Rust`工具链:
5353
1. 如果你已经安装了一个版本的Rust:
5454
```bash
55-
rustup toolchain add nightly-2020-11-20
56-
rustup default nightly-2020-11-20
57-
rustup component add llvm-tools-preview
58-
rustup target add aarch64-unknown-none-softfloat
5955
cargo install cargo-binutils rustfilt
6056
```
6157

62-
2. 如果你想要全新安装:
58+
1. 如果你想要全新安装:
6359
```bash
64-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- \
65-
--default-toolchain nightly-2020-11-20 \
66-
--component llvm-tools-preview
60+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
6761
6862
source $HOME/.cargo/env
69-
rustup target add aarch64-unknown-none-softfloat
7063
cargo install cargo-binutils rustfilt
7164
```
7265

73-
4. 如果你使用 `Visual Studio Code`,我强烈推荐你安装[Rust Analyzer 扩展]。
74-
5. 如果你使用的**不是**Linux,那么你还需要安装一些`Ruby` gems。
66+
1. 如果你使用 `Visual Studio Code`,我强烈推荐你安装[Rust Analyzer 扩展]。
67+
1. 如果你使用的**不是**Linux,那么你还需要安装一些`Ruby` gems。
7568

7669
```bash
7770
sudo gem install bundler

README.md

Lines changed: 6 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -65,29 +65,23 @@ other Unix flavors such as **macOS**, but this is only _experimental_.
6565

6666
1. [Install Docker][install_docker].
6767
1. Ensure your user account is in the [docker group].
68-
1. Install a suitable `Rust` toolchain:
68+
1. Prepare the `Rust` toolchain. Most of it will be handled on first use through the
69+
[rust-toolchain](rust-toolchain) file. What's left for us to do is:
6970
1. If you already have a version of Rust installed:
7071
```bash
71-
rustup toolchain add nightly-2020-11-20
72-
rustup default nightly-2020-11-20
73-
rustup component add llvm-tools-preview
74-
rustup target add aarch64-unknown-none-softfloat
7572
cargo install cargo-binutils rustfilt
7673
```
7774

78-
2. If you need a fresh install:
75+
1. If you need to install Rust from scratch:
7976
```bash
80-
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- \
81-
--default-toolchain nightly-2020-11-20 \
82-
--component llvm-tools-preview
77+
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
8378
8479
source $HOME/.cargo/env
85-
rustup target add aarch64-unknown-none-softfloat
8680
cargo install cargo-binutils rustfilt
8781
```
8882

89-
3. In case you use `Visual Studio Code`, I strongly recommend installing the [Rust Analyzer extension].
90-
4. If you are **NOT** running Linux, some `Ruby` gems are needed as well:
83+
1. In case you use `Visual Studio Code`, I strongly recommend installing the [Rust Analyzer extension].
84+
1. If you are **NOT** running Linux, some `Ruby` gems are needed as well:
9185

9286
```bash
9387
sudo gem install bundler

rust-toolchain

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
[toolchain]
2+
channel = "nightly-2020-12-08"
3+
components = ["llvm-tools-preview"]
4+
targets = ["aarch64-unknown-none-softfloat"]

0 commit comments

Comments
 (0)