From fa18067f99625b6eb77d90fa9f08c25db562e16a Mon Sep 17 00:00:00 2001 From: Marko Bencun Date: Wed, 25 Mar 2020 10:34:12 +0100 Subject: [PATCH] rust: use nightly-2020-03-25 This is to be able to use async/await syntax, which was merged a few days ago into nightly for no_std: https://github.com/rust-lang/rust/pull/69033. This feature will be in beta in April and stable in June, at which point we can start to use those channels again. rust-toolchain file is added as a sanity check or for devs/users not using Docker. --- .ci/travis-ci | 2 +- Dockerfile | 6 ++++-- rust-toolchain | 1 + 3 files changed, 6 insertions(+), 3 deletions(-) create mode 100644 rust-toolchain diff --git a/.ci/travis-ci b/.ci/travis-ci index feb1d8621..72178ddab 100755 --- a/.ci/travis-ci +++ b/.ci/travis-ci @@ -3,7 +3,7 @@ set -e set -x -CONTAINER=shiftcrypto/firmware_v2:13 +CONTAINER=shiftcrypto/firmware_v2:14 if [ "$1" == "pull" ] ; then docker pull "$CONTAINER" diff --git a/Dockerfile b/Dockerfile index 082c16a1e..7bc59adc7 100644 --- a/Dockerfile +++ b/Dockerfile @@ -132,9 +132,11 @@ ENV PATH /opt/lcov-1.14/bin:$PATH # Install rust compiler ENV PATH /opt/cargo/bin:$PATH ENV RUSTUP_HOME=/opt/rustup -RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | CARGO_HOME=/opt/cargo sh -s -- --default-toolchain 1.42.0 -y +COPY rust-toolchain /tmp/rust-toolchain +RUN curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | CARGO_HOME=/opt/cargo sh -s -- --default-toolchain $(cat /tmp/rust-toolchain | tr -d '\r\n\t') -y RUN rustup target add thumbv7em-none-eabi -RUN rustup component add rustfmt +# re-enable and put into CI once available: https://rust-lang.github.io/rustup-components-history/index.html +# RUN rustup component add rustfmt RUN rustup component add clippy RUN CARGO_HOME=/opt/cargo cargo install cbindgen --version 0.13.1 RUN CARGO_HOME=/opt/cargo cargo install bindgen --version 0.53.2 diff --git a/rust-toolchain b/rust-toolchain new file mode 100644 index 000000000..d3f69cd36 --- /dev/null +++ b/rust-toolchain @@ -0,0 +1 @@ +nightly-2020-03-25