From 4cb4462bf9f0dbaa6a148d5475b45be265344a59 Mon Sep 17 00:00:00 2001 From: 81reap Date: Wed, 23 Sep 2026 22:58:32 -0400 Subject: [PATCH 1/3] refactor(rust) :: pin toolchain with `rust-toolchain.toml` Before the Dockerfile pinned 1.95 but the CI steps would use the current stable version of Rust. Now they are all pinned to the same version via `rust-toolchain.toml`. This requires using `actions-rust-lang/setup-rust-toolchain` as it respects the toml file. --- .github/workflows/release.yml | 25 +++++++++++-------------- Dockerfile | 2 +- lambda.Dockerfile | 2 +- rust-toolchain.toml | 4 ++++ 4 files changed, 17 insertions(+), 16 deletions(-) create mode 100755 rust-toolchain.toml diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 3da174c51..6ca92aff1 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -31,13 +31,11 @@ jobs: steps: - uses: actions/checkout@v7 - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@stable + uses: actions-rust-lang/setup-rust-toolchain@v1 with: + # don't overrwrite `.cargo/config.toml` + rustflags: "" targets: ${{ matrix.target }} - - name: Set up cargo cache - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 - env: - NODE_OPTIONS: --no-deprecation - uses: ./.github/actions/install-frontend-dependencies - name: Build run: cargo build --profile superoptimized --locked --target ${{ matrix.target }} --features "${{ matrix.features }}" @@ -89,13 +87,11 @@ jobs: steps: - uses: actions/checkout@v7 - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@stable + uses: actions-rust-lang/setup-rust-toolchain@v1 with: + # don't overrwrite `.cargo/config.toml` + rustflags: "" targets: x86_64-unknown-linux-gnu - - name: Set up cargo cache - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 - env: - NODE_OPTIONS: --no-deprecation - uses: ./.github/actions/install-frontend-dependencies - name: Build run: cargo build --profile superoptimized --locked --target x86_64-unknown-linux-gnu --features "odbc-static" @@ -157,10 +153,11 @@ jobs: if: startsWith(github.ref, 'refs/tags/') steps: - uses: actions/checkout@v7 - - name: Set up cargo cache - uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 - env: - NODE_OPTIONS: --no-deprecation + - name: Install Rust toolchain + uses: actions-rust-lang/setup-rust-toolchain@v1 + with: + # don't overrwrite `.cargo/config.toml` + rustflags: "" - run: sudo apt-get update && sudo apt-get install -y unixodbc-dev - uses: ./.github/actions/install-frontend-dependencies - name: Publish to crates.io diff --git a/Dockerfile b/Dockerfile index 71c5149b0..e12dd0d29 100644 --- a/Dockerfile +++ b/Dockerfile @@ -6,7 +6,7 @@ COPY frontend/src/ frontend/src/ COPY scripts/build-frontend.mjs scripts/ RUN node scripts/build-frontend.mjs -FROM --platform=$BUILDPLATFORM rust:1.95-slim AS builder +FROM --platform=$BUILDPLATFORM rust:1.98.1-slim AS builder WORKDIR /usr/src/sqlpage ARG TARGETARCH diff --git a/lambda.Dockerfile b/lambda.Dockerfile index f17f3f940..934b4df29 100644 --- a/lambda.Dockerfile +++ b/lambda.Dockerfile @@ -6,7 +6,7 @@ COPY frontend/src/ frontend/src/ COPY scripts/build-frontend.mjs scripts/ RUN node scripts/build-frontend.mjs -FROM rust:1.95-alpine AS builder +FROM rust:1.98.1-alpine AS builder RUN rustup component add clippy rustfmt RUN apk add --no-cache musl-dev zip WORKDIR /usr/src/sqlpage diff --git a/rust-toolchain.toml b/rust-toolchain.toml new file mode 100755 index 000000000..de4110d95 --- /dev/null +++ b/rust-toolchain.toml @@ -0,0 +1,4 @@ +[toolchain] +channel = "1.98.1" +profile = "minimal" +components = ["clippy", "rust-analyzer", "rust-src", "rustfmt"] From fa96cbfcef15ac551cd7f8760df7e30d0135f5a0 Mon Sep 17 00:00:00 2001 From: 81reap Date: Sun, 27 Sep 2026 20:18:38 -0400 Subject: [PATCH 2/3] fixup! refactor(rust) :: pin toolchain with `rust-toolchain.toml` --- .github/workflows/release.yml | 29 ++++++++++++----------------- 1 file changed, 12 insertions(+), 17 deletions(-) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 6ca92aff1..30e8c40cf 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -30,12 +30,10 @@ jobs: features: "odbc-static" steps: - uses: actions/checkout@v7 - - name: Install Rust toolchain - uses: actions-rust-lang/setup-rust-toolchain@v1 - with: - # don't overrwrite `.cargo/config.toml` - rustflags: "" - targets: ${{ matrix.target }} + - name: Set up cargo cache + uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 + env: + NODE_OPTIONS: --no-deprecation - uses: ./.github/actions/install-frontend-dependencies - name: Build run: cargo build --profile superoptimized --locked --target ${{ matrix.target }} --features "${{ matrix.features }}" @@ -86,12 +84,10 @@ jobs: container: quay.io/pypa/manylinux_2_28_x86_64 steps: - uses: actions/checkout@v7 - - name: Install Rust toolchain - uses: actions-rust-lang/setup-rust-toolchain@v1 - with: - # don't overrwrite `.cargo/config.toml` - rustflags: "" - targets: x86_64-unknown-linux-gnu + - name: Set up cargo cache + uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 + env: + NODE_OPTIONS: --no-deprecation - uses: ./.github/actions/install-frontend-dependencies - name: Build run: cargo build --profile superoptimized --locked --target x86_64-unknown-linux-gnu --features "odbc-static" @@ -153,11 +149,10 @@ jobs: if: startsWith(github.ref, 'refs/tags/') steps: - uses: actions/checkout@v7 - - name: Install Rust toolchain - uses: actions-rust-lang/setup-rust-toolchain@v1 - with: - # don't overrwrite `.cargo/config.toml` - rustflags: "" + - name: Set up cargo cache + uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 + env: + NODE_OPTIONS: --no-deprecation - run: sudo apt-get update && sudo apt-get install -y unixodbc-dev - uses: ./.github/actions/install-frontend-dependencies - name: Publish to crates.io From 7c1020f2a846e77bbd27e004a64a49ecc66f715d Mon Sep 17 00:00:00 2001 From: 81reap Date: Sun, 27 Sep 2026 23:39:06 -0400 Subject: [PATCH 3/3] fixup! refactor(rust) :: pin toolchain with `rust-toolchain.toml` --- .github/workflows/release.yml | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 30e8c40cf..902b77b71 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -84,6 +84,11 @@ jobs: container: quay.io/pypa/manylinux_2_28_x86_64 steps: - uses: actions/checkout@v7 + # The manylinux image ships no rustup, unlike the GitHub-hosted runners. + - name: Install rustup + run: | + curl --proto '=https' --tlsv1.2 -sSf https://sh.rustup.rs | sh -s -- -y --default-toolchain none + echo "$HOME/.cargo/bin" >> "$GITHUB_PATH" - name: Set up cargo cache uses: Swatinem/rust-cache@c19371144df3bb44fab255c43d04cbc2ab54d1c4 env: