Skip to content

Commit

Permalink
rust-toolchain: Migrate to TOML version of rust-toolchain
Browse files Browse the repository at this point in the history
  • Loading branch information
kostko committed May 3, 2022
1 parent 4679de4 commit eab391c
Show file tree
Hide file tree
Showing 8 changed files with 14 additions and 23 deletions.
1 change: 1 addition & 0 deletions .changelog/4727.internal.md
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
rust-toolchain: Migrate to TOML version of rust-toolchain
4 changes: 1 addition & 3 deletions .github/workflows/ci-lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -48,9 +48,7 @@ jobs:
with:
go-version: "1.17.x"
- name: Set up Rust
uses: actions-rs/toolchain@v1
with:
components: clippy
run: rustup show
- name: Install dependencies
run: |
sudo apt-get update
Expand Down
8 changes: 2 additions & 6 deletions .github/workflows/ci-reproducibility.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,17 +37,13 @@ jobs:
# NOTE: We make a git checkout to a unique directory for each build to
# catch reproducibility issues with code in different local paths.
path: build${{ matrix.build_number }}
- name: Copy rust-toolchain file
run: |
# Copy rust-toolchain file as it gets checked out into a subdir which is not
# supported by actions-rs/toolchain.
cp build${{ matrix.build_number }}/rust-toolchain .
- name: Set up Go 1.17
uses: actions/setup-go@v3
with:
go-version: "1.17.x"
- name: Set up Rust
uses: actions-rs/toolchain@v1
working-directory: build${{ matrix.build_number }}
run: rustup show
- name: Install Oasis Node prerequisites
run: |
sudo apt-get update
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release-dev.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,7 +38,7 @@ jobs:
with:
go-version: "1.17.x"
- name: Set up Rust
uses: actions-rs/toolchain@v1
run: rustup show
- name: Install Oasis Node prerequisites
run: |
sudo apt-get update
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ jobs:
go-version: "1.17.x"

- name: Set up Rust
uses: actions-rs/toolchain@v1
run: rustup show

- name: Install Oasis Node prerequisites
run: |
Expand Down
15 changes: 4 additions & 11 deletions docs/development-setup/prerequisites.md
Original file line number Diff line number Diff line change
Expand Up @@ -103,7 +103,7 @@ Core:
* Oasis Core's Rust toolchain version with Fortanix SGX target.
The version of the Rust toolchain we use in Oasis Core is specified in the
[rust-toolchain] file.
[`rust-toolchain.toml`] file.
The rustup-installed versions of `cargo`, `rustc` and other tools will
[automatically detect this file and use the appropriate version of the Rust
Expand All @@ -126,17 +126,10 @@ Core:
active toolchain
----------------

nightly-2022-04-13-x86_64-unknown-linux-gnu (overridden by '/code/rust-toolchain')
nightly-2022-04-13-x86_64-unknown-linux-gnu (overridden by '/code/rust-toolchain.toml')
rustc 1.62.0-nightly (52ca603da 2022-04-12)
```
Then add the Fortanix SGX Rust target to this version of the Rust toolchain by
running:
```
rustup target add x86_64-fortanix-unknown-sgx
```
* (**OPTIONAL**) [gofumpt] and [goimports].
Required if you plan to change any of the Go code in order for automated code
Expand Down Expand Up @@ -236,8 +229,8 @@ where the code has been checked out.
[download `rustup-init` executable for your platform]:
https://github.com/rust-lang/rustup#other-installation-methods
[Rust]: https://www.rust-lang.org/
[rust-toolchain]:
https://github.com/oasisprotocol/oasis-core/tree/master/rust-toolchain
[`rust-toolchain.toml`]:
https://github.com/oasisprotocol/oasis-core/tree/master/rust-toolchain.toml
[rust-toolchain-precedence]:
https://github.com/rust-lang/rustup/blob/master/README.md#override-precedence
[Fortanix Rust EDP]: https://edp.fortanix.com
Expand Down
1 change: 0 additions & 1 deletion rust-toolchain

This file was deleted.

4 changes: 4 additions & 0 deletions rust-toolchain.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
[toolchain]
channel = "nightly-2022-04-13"
targets = ["x86_64-fortanix-unknown-sgx"]
components = ["clippy", "rustfmt"]

0 comments on commit eab391c

Please sign in to comment.