From 0f468bdfe7d8bf0994f05fd15ccc596e759adee8 Mon Sep 17 00:00:00 2001 From: Piotr Sikora Date: Sun, 21 Jul 2024 18:16:00 -0400 Subject: [PATCH] Update MSRV to Rust v1.64.0. Technically, this happened as a result of hashbrown update in #195, but we didn't catch it at the time. Add tests using MSRV to prevent this from happening in the future. Signed-off-by: Piotr Sikora --- .github/workflows/rust.yml | 53 ++++++++++++++++++++++++++++++++++++-- Cargo.toml | 2 +- 2 files changed, 52 insertions(+), 3 deletions(-) diff --git a/.github/workflows/rust.yml b/.github/workflows/rust.yml index 3f753bfc..128a9ed3 100644 --- a/.github/workflows/rust.yml +++ b/.github/workflows/rust.yml @@ -88,6 +88,55 @@ jobs: bazelisk --noworkspace_rc run --noenable_bzlmod //bazel/cargo:crates_vendor git diff --exit-code + msrv: + runs-on: ubuntu-latest + + env: + RUSTFLAGS: -D warnings + + steps: + - uses: actions/checkout@v2 + + - name: Install dependencies + if: ${{ env.ACT }} + run: | + curl -OL https://static.rust-lang.org/rustup/rustup-init.sh + chmod +x ./rustup-init.sh + ./rustup-init.sh -y --default-toolchain 1.64.0 + rm rustup-init.sh + echo "$HOME/.cargo/bin" >> $GITHUB_PATH + + - name: Update Rust + run: | + rustup toolchain install 1.64.0 --component clippy --component rustfmt + rustup default 1.64.0 + rustup target add wasm32-unknown-unknown + rustup target add wasm32-wasi + + - name: Build (wasm32-unknown-unknown) + run: cargo build --release --all-targets --target=wasm32-unknown-unknown + + - name: Clippy (wasm32-unknown-unknown) + run: cargo clippy --release --all-targets --target=wasm32-unknown-unknown + + - name: Build (wasm32-wasi) + run: cargo build --release --all-targets --target=wasm32-wasi + + - name: Clippy (wasm32-wasi) + run: cargo clippy --release --all-targets --target=wasm32-wasi + + - name: Format (rustfmt) + run: cargo fmt -- --check + + - name: Format (manifest) + run: cargo verify-project + + - name: Package (docs) + run: cargo doc --no-deps --target=wasm32-unknown-unknown + + - name: Package (publish) + run: cargo publish --dry-run --target=wasm32-unknown-unknown + stable: runs-on: ubuntu-latest @@ -157,9 +206,9 @@ jobs: - name: Update Rust run: | rustup toolchain install nightly --component clippy --component rustfmt - rustup +nightly target add wasm32-unknown-unknown - rustup +nightly target add wasm32-wasi rustup default nightly + rustup target add wasm32-unknown-unknown + rustup target add wasm32-wasi - name: Build (wasm32-unknown-unknown) run: cargo build --release --all-targets --target=wasm32-unknown-unknown diff --git a/Cargo.toml b/Cargo.toml index 75fcff10..c59d968c 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -2,7 +2,7 @@ name = "proxy-wasm" version = "0.2.2" authors = ["Piotr Sikora "] -rust-version = "1.61" +rust-version = "1.64" description = "WebAssembly for Proxies" readme = "README.md" license = "Apache-2.0"