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
pull/88/head
Andre Richter 3 years ago
parent 6eafd7c81e
commit 709b67f1ce
No known key found for this signature in database
GPG Key ID: 2116C1AB102F615E

@ -52,26 +52,19 @@ _带上我最诚挚的问候,<br>Andre ([@andre-richter])_
3. 安装正确的`Rust`工具链:
1. 如果你已经安装了一个版本的Rust:
```bash
rustup toolchain add nightly-2020-11-20
rustup default nightly-2020-11-20
rustup component add llvm-tools-preview
rustup target add aarch64-unknown-none-softfloat
cargo install cargo-binutils rustfilt
```
2. 如果你想要全新安装:
1. 如果你想要全新安装:
```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- \
--default-toolchain nightly-2020-11-20 \
--component llvm-tools-preview
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
rustup target add aarch64-unknown-none-softfloat
cargo install cargo-binutils rustfilt
```
4. 如果你使用 `Visual Studio Code`,我强烈推荐你安装[Rust Analyzer 扩展]。
5. 如果你使用的**不是**Linux那么你还需要安装一些`Ruby` gems。
1. 如果你使用 `Visual Studio Code`,我强烈推荐你安装[Rust Analyzer 扩展]。
1. 如果你使用的**不是**Linux那么你还需要安装一些`Ruby` gems。
```bash
sudo gem install bundler

@ -65,29 +65,23 @@ other Unix flavors such as **macOS**, but this is only _experimental_.
1. [Install Docker][install_docker].
1. Ensure your user account is in the [docker group].
1. Install a suitable `Rust` toolchain:
1. Prepare the `Rust` toolchain. Most of it will be handled on first use through the
[rust-toolchain](rust-toolchain) file. What's left for us to do is:
1. If you already have a version of Rust installed:
```bash
rustup toolchain add nightly-2020-11-20
rustup default nightly-2020-11-20
rustup component add llvm-tools-preview
rustup target add aarch64-unknown-none-softfloat
cargo install cargo-binutils rustfilt
```
2. If you need a fresh install:
1. If you need to install Rust from scratch:
```bash
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- \
--default-toolchain nightly-2020-11-20 \
--component llvm-tools-preview
curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh
source $HOME/.cargo/env
rustup target add aarch64-unknown-none-softfloat
cargo install cargo-binutils rustfilt
```
3. In case you use `Visual Studio Code`, I strongly recommend installing the [Rust Analyzer extension].
4. If you are **NOT** running Linux, some `Ruby` gems are needed as well:
1. In case you use `Visual Studio Code`, I strongly recommend installing the [Rust Analyzer extension].
1. If you are **NOT** running Linux, some `Ruby` gems are needed as well:
```bash
sudo gem install bundler

@ -0,0 +1,4 @@
[toolchain]
channel = "nightly-2020-12-08"
components = ["llvm-tools-preview"]
targets = ["aarch64-unknown-none-softfloat"]
Loading…
Cancel
Save