From 26e2d5020ab912e5cf7695500ec10b69d1e9998d Mon Sep 17 00:00:00 2001 From: Thomas Eizinger Date: Tue, 24 Oct 2023 17:18:54 +1100 Subject: [PATCH] chore: bump MSRV to 1.73 With the upcoming `v0.53` release, I'd suggest we also bump the MSRV. This will allows to make use of new things like: - `let else` - `std::pin::pin!` - `OnceCell` For now, this PR doesn't make us of any of these. We can always ship them as internal improvements later and enforce certain things via lints (like `let else`). Pull-Request: #4692. --- Cargo.toml | 2 +- interop-tests/Dockerfile.chromium | 8 ++++---- interop-tests/Dockerfile.native | 10 +++++----- libp2p/CHANGELOG.md | 2 ++ misc/server/Dockerfile | 2 +- 5 files changed, 13 insertions(+), 11 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index ca60d469595..347ccb74c39 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -67,7 +67,7 @@ members = [ resolver = "2" [workspace.package] -rust-version = "1.65.0" +rust-version = "1.73.0" [workspace.dependencies] futures-bounded = { version = "0.1.0", path = "misc/futures-bounded" } diff --git a/interop-tests/Dockerfile.chromium b/interop-tests/Dockerfile.chromium index ab720c4d317..5ec46e313aa 100644 --- a/interop-tests/Dockerfile.chromium +++ b/interop-tests/Dockerfile.chromium @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:1.5-labs -FROM rust:1.67.0 as chef +FROM rust:1.73.0 as chef RUN rustup target add wasm32-unknown-unknown RUN wget -q -O- https://github.com/rustwasm/wasm-pack/releases/download/v0.12.1/wasm-pack-v0.12.1-x86_64-unknown-linux-musl.tar.gz | tar -zx -C /usr/local/bin --strip-components 1 --wildcards "wasm-pack-*/wasm-pack" RUN wget -q -O- https://github.com/WebAssembly/binaryen/releases/download/version_115/binaryen-version_115-x86_64-linux.tar.gz | tar -zx -C /usr/local/bin --strip-components 2 --wildcards "binaryen-version_*/bin/wasm-opt" @@ -14,13 +14,13 @@ FROM chef AS builder COPY --from=planner /app/recipe.json recipe.json # Build dependencies - this is the caching Docker layer! RUN cargo chef cook --release --package interop-tests --target wasm32-unknown-unknown --recipe-path recipe.json -RUN cargo chef cook --release --package interop-tests --bin wasm_ping --recipe-path recipe.json +RUN RUSTFLAGS='-C target-feature=+crt-static' cargo chef cook --release --package interop-tests --target x86_64-unknown-linux-gnu --bin wasm_ping --recipe-path recipe.json # Build application COPY . . RUN wasm-pack build --target web interop-tests -RUN cargo build --release --package interop-tests --bin wasm_ping +RUN RUSTFLAGS='-C target-feature=+crt-static' cargo build --release --package interop-tests --target x86_64-unknown-linux-gnu --bin wasm_ping FROM selenium/standalone-chrome:115.0 -COPY --from=builder /app/target/release/wasm_ping /usr/local/bin/testplan +COPY --from=builder /app/target/x86_64-unknown-linux-gnu/release/wasm_ping /usr/local/bin/testplan ENV RUST_BACKTRACE=1 ENTRYPOINT ["testplan"] diff --git a/interop-tests/Dockerfile.native b/interop-tests/Dockerfile.native index df5eb9a1240..047194b7135 100644 --- a/interop-tests/Dockerfile.native +++ b/interop-tests/Dockerfile.native @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:1.5-labs -FROM rust:1.67.0 as chef +FROM rust:1.73.0 as chef RUN wget -q -O- https://github.com/LukeMathWalker/cargo-chef/releases/download/v0.1.62/cargo-chef-x86_64-unknown-linux-gnu.tar.gz | tar -zx -C /usr/local/bin WORKDIR /app @@ -10,12 +10,12 @@ RUN cargo chef prepare --recipe-path recipe.json FROM chef AS builder COPY --from=planner /app/recipe.json recipe.json # Build dependencies - this is the caching Docker layer! -RUN cargo chef cook --release --package interop-tests --bin native_ping --recipe-path recipe.json +RUN RUSTFLAGS='-C target-feature=+crt-static' cargo chef cook --release --package interop-tests --target x86_64-unknown-linux-gnu --bin native_ping --recipe-path recipe.json # Build application COPY . . -RUN cargo build --release --package interop-tests --bin native_ping +RUN RUSTFLAGS='-C target-feature=+crt-static' cargo build --release --package interop-tests --target x86_64-unknown-linux-gnu --bin native_ping -FROM gcr.io/distroless/cc -COPY --from=builder /app/target/release/native_ping /usr/local/bin/testplan +FROM scratch +COPY --from=builder /app/target/x86_64-unknown-linux-gnu/release/native_ping /usr/local/bin/testplan ENV RUST_BACKTRACE=1 ENTRYPOINT ["testplan"] diff --git a/libp2p/CHANGELOG.md b/libp2p/CHANGELOG.md index ee0e07e7449..245fb83c85b 100644 --- a/libp2p/CHANGELOG.md +++ b/libp2p/CHANGELOG.md @@ -1,5 +1,7 @@ ## 0.53.0 - unreleased +- Raise MSRV to 1.73. + See [PR 4692](https://github.com/libp2p/rust-libp2p/pull/4692). - Remove deprecated `libp2p-wasm-ext`. Users should use `libp2p-websocket-websys` instead. See [PR 4694](https://github.com/libp2p/rust-libp2p/pull/4694). diff --git a/misc/server/Dockerfile b/misc/server/Dockerfile index 90e504f4b11..9d2742f97e8 100644 --- a/misc/server/Dockerfile +++ b/misc/server/Dockerfile @@ -1,5 +1,5 @@ # syntax=docker/dockerfile:1.5-labs -FROM rust:1.67.0 as chef +FROM rust:1.73.0 as chef RUN wget -q -O- https://github.com/LukeMathWalker/cargo-chef/releases/download/v0.1.62/cargo-chef-x86_64-unknown-linux-gnu.tar.gz | tar -zx -C /usr/local/bin RUN cargo install --locked --root /usr/local libp2p-lookup --version 0.6.4 WORKDIR /app