From 599f6a245945645f9a9819f623067716a84a3bd7 Mon Sep 17 00:00:00 2001 From: Mazdak Farrokhzad Date: Wed, 22 Jul 2020 13:33:32 +0200 Subject: [PATCH] Pin `rust-toolchain` to 2020-07-11 (#479) * pin rust-toolchain to 2020-07-11 * scripts/init.sh: nix 'rustup update's * scripts/init.sh: nix '+nightly' for wasm-gc --- rust-toolchain | 1 + scripts/init.sh | 13 ++++++------- 2 files changed, 7 insertions(+), 7 deletions(-) create mode 100644 rust-toolchain diff --git a/rust-toolchain b/rust-toolchain new file mode 100644 index 0000000000..3aa4b7bcf2 --- /dev/null +++ b/rust-toolchain @@ -0,0 +1 @@ +nightly-2020-07-11 diff --git a/scripts/init.sh b/scripts/init.sh index cf5ecf9792..d15027a3df 100755 --- a/scripts/init.sh +++ b/scripts/init.sh @@ -4,13 +4,12 @@ set -e echo "*** Initializing WASM build environment" -if [ -z $CI_PROJECT_NAME ] ; then - rustup update nightly - rustup update stable -fi - -rustup target add wasm32-unknown-unknown --toolchain nightly +# Fetch name of preferred toolchain... +TOOLCHAIN=$(< $(dirname $0)/../rust-toolchain) +# ...and install it + wasm32 target. +rustup toolchain install $TOOLCHAIN +rustup target add wasm32-unknown-unknown --toolchain $TOOLCHAIN # Install wasm-gc. It's useful for stripping slimming down wasm binaries. command -v wasm-gc || \ - cargo +nightly install --git https://github.com/alexcrichton/wasm-gc --force + cargo install --git https://github.com/alexcrichton/wasm-gc --force