From dfde4c4d18da056fc2bb052eb0c764614a82d78e Mon Sep 17 00:00:00 2001 From: Brad Campbell Date: Wed, 23 Aug 2023 00:13:32 -0400 Subject: [PATCH] use stable rust by default Only use nightly for miri. --- Makefile | 20 ++++---------------- rust-toolchain | 6 ++---- 2 files changed, 6 insertions(+), 20 deletions(-) diff --git a/Makefile b/Makefile index 201581d1..7f71ab15 100644 --- a/Makefile +++ b/Makefile @@ -46,9 +46,8 @@ endif .PHONY: setup setup: setup-qemu rustup install stable - cargo +stable install elf2tab - cargo miri setup - rustup target add --toolchain stable thumbv7em-none-eabi + cargo install elf2tab + cargo +nightly miri setup # Sets up QEMU in the tock/ directory. We use Tock's QEMU which may contain # patches to better support boards that Tock supports. @@ -108,19 +107,8 @@ EXCLUDE_STD := --exclude libtock_unittest --exclude print_sizes \ --exclude runner --exclude syscalls_tests \ --exclude libtock_build_scripts -# Currently, all of our crates should build with a stable toolchain. This -# verifies our crates don't depend on unstable features by using cargo check. We -# specify a different target directory so this doesn't flush the cargo cache of -# the primary toolchain. -.PHONY: test-stable -test-stable: - cargo +stable check --target-dir=target/stable --workspace \ - $(EXCLUDE_RUNTIME) - LIBTOCK_PLATFORM=nrf52 cargo +stable check $(EXCLUDE_STD) \ - --target=thumbv7em-none-eabi --target-dir=target/stable --workspace - .PHONY: test -test: examples test-stable +test: examples cargo test $(EXCLUDE_RUNTIME) --workspace LIBTOCK_PLATFORM=nrf52 cargo fmt --all -- --check cargo clippy --all-targets $(EXCLUDE_RUNTIME) --workspace @@ -129,7 +117,7 @@ test: examples test-stable LIBTOCK_PLATFORM=hifive1 cargo clippy $(EXCLUDE_STD) \ --target=riscv32imac-unknown-none-elf --workspace MIRIFLAGS="-Zmiri-strict-provenance -Zmiri-symbolic-alignment-check" \ - cargo miri test $(EXCLUDE_MIRI) --workspace + cargo +nightly miri test $(EXCLUDE_MIRI) --workspace echo '[ SUCCESS ] libtock-rs tests pass' # Helper functions to define make targets to build for specific (flash, ram, diff --git a/rust-toolchain b/rust-toolchain index 873e2ff6..a9b2b057 100644 --- a/rust-toolchain +++ b/rust-toolchain @@ -1,8 +1,6 @@ [toolchain] -# See https://rust-lang.github.io/rustup-components-history/ for a list of -# recently nightlies and what components are available for them. -channel = "nightly-2023-08-22" -components = ["clippy", "miri", "rustfmt"] +channel = "stable" +components = ["clippy", "rustfmt"] targets = ["thumbv6m-none-eabi", "thumbv7em-none-eabi", "riscv32imac-unknown-none-elf",