diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 8c6f743..8f4217b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -18,6 +18,9 @@ env: CARGO_INCREMENTAL: "0" CARGO_PROFILE_DEV_DEBUG: "0" CARGO_PROFILE_TEST_DEBUG: "0" + # Cargo 1.97+ can make build-script/linker warnings fatal without changing + # RUSTFLAGS and invalidating otherwise reusable compiler artifacts. + CARGO_BUILD_WARNINGS: deny jobs: lockfile: @@ -26,10 +29,31 @@ jobs: timeout-minutes: 10 steps: - uses: actions/checkout@v7 - - name: Install pinned Rust toolchain - run: rustup toolchain install 1.94.0 --profile minimal + - name: Install current Rust toolchain + run: rustup toolchain install 1.98.1 --profile minimal - name: Verify lockfile is current - run: cargo metadata --locked --format-version 1 >/dev/null + run: cargo +1.98.1 metadata --locked --format-version 1 >/dev/null + + msrv: + name: MSRV (Rust 1.94.1) + runs-on: ubuntu-24.04 + timeout-minutes: 30 + # Rust 1.94 remains the compatibility contract. Keep this lane separate + # from the current-stable lane so new language/library features cannot + # silently raise the floor. + steps: + - uses: actions/checkout@v7 + - name: Install patched MSRV toolchain + run: | + rustup toolchain install 1.94.1 --profile minimal --target wasm32-unknown-unknown + rustc +1.94.1 --version + cargo +1.94.1 --version + - name: Check native workspace at MSRV + run: cargo +1.94.1 check --locked --workspace --all-targets + - name: Check hydration crates at MSRV + run: | + cargo +1.94.1 check --locked -p live-search --target wasm32-unknown-unknown --features hydrate --lib + cargo +1.94.1 check --locked -p i18n-demo --target wasm32-unknown-unknown --features hydrate --lib format: name: Format @@ -37,29 +61,29 @@ jobs: timeout-minutes: 20 steps: - uses: actions/checkout@v7 - - name: Install pinned Rust toolchain + - name: Install current Rust toolchain run: | - rustup toolchain install 1.94.0 --profile minimal --component rustfmt - rustc --version - cargo --version + rustup toolchain install 1.98.1 --profile minimal --component rustfmt + rustc +1.98.1 --version + cargo +1.98.1 --version - name: Restore leptosfmt id: leptosfmt-cache uses: actions/cache@v5 with: path: ~/.cargo/bin/leptosfmt - key: ci-tool-${{ runner.os }}-leptosfmt-0.1.33 + key: ci-tool-${{ runner.os }}-leptosfmt-0.1.33-rust-1.98.1 - name: Install Leptos formatter if: steps.leptosfmt-cache.outputs.cache-hit != 'true' - run: cargo +stable install leptosfmt --version 0.1.33 --locked + run: cargo +1.98.1 install leptosfmt --version 0.1.33 --locked - name: Generate canonical formatting id: format run: | - cargo fmt --all + cargo +1.98.1 fmt --all while IFS= read -r -d '' f; do leptosfmt --rustfmt --stdin --quiet < "$f" > "$f.tmp" mv "$f.tmp" "$f" done < <(find live-search i18n-demo -name '*.rs' -print0) - cargo fmt --all + cargo +1.98.1 fmt --all if git diff --quiet; then echo "changed=false" >> "$GITHUB_OUTPUT" @@ -84,18 +108,15 @@ jobs: name: Clippy (native) runs-on: ubuntu-24.04 timeout-minutes: 30 - # Unlike sccache, Cargo's target directory can preserve Clippy metadata and - # rustc incremental state. The repository pins rustc, so this is safe to - # reuse across successive commits to the same PR. env: CARGO_INCREMENTAL: "1" steps: - uses: actions/checkout@v7 - - name: Install pinned Rust toolchain + - name: Install current Rust toolchain run: | - rustup toolchain install 1.94.0 --profile minimal --component clippy - rustc --version - cargo --version + rustup toolchain install 1.98.1 --profile minimal --component clippy + rustc +1.98.1 --version + cargo +1.98.1 --version - name: Restore Clippy build cache uses: actions/cache@v5 with: @@ -105,25 +126,25 @@ jobs: target/debug/deps target/debug/examples target/debug/incremental - key: clippy-target-v1-${{ runner.os }}-rust-1.94.0-${{ hashFiles('Cargo.lock') }}-${{ github.sha }} + key: clippy-target-v2-${{ runner.os }}-rust-1.98.1-${{ hashFiles('Cargo.lock') }}-${{ github.sha }} restore-keys: | - clippy-target-v1-${{ runner.os }}-rust-1.94.0-${{ hashFiles('Cargo.lock') }}- - clippy-target-v1-${{ runner.os }}-rust-1.94.0- + clippy-target-v2-${{ runner.os }}-rust-1.98.1-${{ hashFiles('Cargo.lock') }}- + clippy-target-v2-${{ runner.os }}-rust-1.98.1- - name: Clippy run: | - cargo clippy --locked --workspace --all-targets -- -D warnings - cargo clippy --locked -p live-search --features ssr --all-targets -- -D warnings - cargo clippy --locked -p live-search --features ssr,otel --all-targets -- -D warnings - cargo clippy --locked -p gateway-example --features otel --all-targets -- -D warnings - cargo clippy --locked -p i18n-demo --features ssr --all-targets -- -D warnings + cargo +1.98.1 clippy --locked --workspace --all-targets -- -D warnings + cargo +1.98.1 clippy --locked -p live-search --features ssr --all-targets -- -D warnings + cargo +1.98.1 clippy --locked -p live-search --features ssr,otel --all-targets -- -D warnings + cargo +1.98.1 clippy --locked -p gateway-example --features otel --all-targets -- -D warnings + cargo +1.98.1 clippy --locked -p i18n-demo --features ssr --all-targets -- -D warnings - name: Report Clippy cache footprint if: always() run: du -sh target/debug 2>/dev/null || true wasm-check: - name: WASM check (${{ matrix.package }}) + name: WASM link (${{ matrix.package }}) runs-on: ubuntu-24.04 - timeout-minutes: 20 + timeout-minutes: 30 strategy: fail-fast: false matrix: @@ -132,21 +153,20 @@ jobs: - i18n-demo steps: - uses: actions/checkout@v7 - - name: Install pinned Rust toolchain + - name: Install current Rust toolchain run: | - rustup toolchain install 1.94.0 --profile minimal --target wasm32-unknown-unknown - rustc --version - cargo --version - - name: Check hydration build - run: cargo check --locked -p "${{ matrix.package }}" --target wasm32-unknown-unknown --features hydrate --lib + rustup toolchain install 1.98.1 --profile minimal --target wasm32-unknown-unknown + rustc +1.98.1 --version + cargo +1.98.1 --version + # Use `build`, not `check`: Rust 1.96 stopped passing wasm-ld's + # --allow-undefined implicitly, so only a real link exercises that policy. + - name: Link hydration build + run: cargo +1.98.1 build --locked -p "${{ matrix.package }}" --target wasm32-unknown-unknown --features hydrate --lib unit-tests: name: Unit tests runs-on: ubuntu-24.04 timeout-minutes: 30 - # sccache's GHA object backend currently drops writes when concurrent jobs - # hit GitHub's per-run cache-service rate limit. Keep a local sccache store - # and transfer it once through actions/cache instead. env: SCCACHE_DIR: ${{ github.workspace }}/.sccache/unit-tests SCCACHE_CACHE_SIZE: "1G" @@ -161,16 +181,16 @@ jobs: uses: actions/cache@v5 with: path: .sccache/unit-tests - key: sccache-unit-v1-${{ runner.os }}-rust-1.94.0-${{ hashFiles('Cargo.lock', '**/Cargo.toml') }} + key: sccache-unit-v2-${{ runner.os }}-rust-1.98.1-${{ hashFiles('Cargo.lock', '**/Cargo.toml') }} restore-keys: | - sccache-unit-v1-${{ runner.os }}-rust-1.94.0- - - name: Install pinned Rust toolchain + sccache-unit-v2-${{ runner.os }}-rust-1.98.1- + - name: Install current Rust toolchain run: | - rustup toolchain install 1.94.0 --profile minimal - rustc --version - cargo --version + rustup toolchain install 1.98.1 --profile minimal + rustc +1.98.1 --version + cargo +1.98.1 --version - name: Run library tests - run: cargo test --locked --workspace --lib + run: cargo +1.98.1 test --locked --workspace --lib - name: Show sccache stats if: always() run: ${SCCACHE_PATH} --show-stats @@ -181,24 +201,20 @@ jobs: timeout-minutes: 20 steps: - uses: actions/checkout@v7 - - name: Install pinned Rust toolchain + - name: Install current Rust toolchain run: | - rustup toolchain install 1.94.0 --profile minimal - rustc --version - cargo --version + rustup toolchain install 1.98.1 --profile minimal + rustc +1.98.1 --version + cargo +1.98.1 --version - name: Restore cargo-audit id: cargo-audit-cache uses: actions/cache@v5 with: path: ~/.cargo/bin/cargo-audit - key: ci-tool-${{ runner.os }}-cargo-audit-0.22.2 + key: ci-tool-${{ runner.os }}-cargo-audit-0.22.2-rust-1.98.1 - name: Install cargo-audit if: steps.cargo-audit-cache.outputs.cache-hit != 'true' - run: cargo +stable install cargo-audit --version 0.22.2 --locked - # Audit the exact dependency graph committed to the repository. CI must - # not mutate Cargo.lock first: both targeted patched versions are already - # present, and `cargo update -p` can legitimately rewrite unrelated - # transitive edges even when the requested package version is unchanged. + run: cargo +1.98.1 install cargo-audit --version 0.22.2 --locked - name: Audit dependencies run: cargo audit @@ -220,14 +236,14 @@ jobs: uses: actions/cache@v5 with: path: .sccache/leptos-build - key: sccache-leptos-v1-${{ runner.os }}-rust-1.94.0-${{ hashFiles('Cargo.lock', '**/Cargo.toml') }} + key: sccache-leptos-v2-${{ runner.os }}-rust-1.98.1-${{ hashFiles('Cargo.lock', '**/Cargo.toml') }} restore-keys: | - sccache-leptos-v1-${{ runner.os }}-rust-1.94.0- - - name: Install pinned Rust toolchain + sccache-leptos-v2-${{ runner.os }}-rust-1.98.1- + - name: Install current Rust toolchain run: | - rustup toolchain install 1.94.0 --profile minimal --target wasm32-unknown-unknown - rustc --version - cargo --version + rustup toolchain install 1.98.1 --profile minimal --target wasm32-unknown-unknown + rustc +1.98.1 --version + cargo +1.98.1 --version - name: Restore Leptos build tools id: leptos-tools-cache uses: actions/cache@v5 @@ -235,22 +251,22 @@ jobs: path: | ~/.cargo/bin/cargo-leptos ~/.cargo/bin/stylance - key: ci-tools-${{ runner.os }}-cargo-leptos-0.3.7-stylance-0.8.4 + key: ci-tools-${{ runner.os }}-cargo-leptos-0.3.7-stylance-0.8.4-rust-1.98.1 - name: Install build tools if: steps.leptos-tools-cache.outputs.cache-hit != 'true' run: | - cargo +stable install cargo-leptos --version 0.3.7 --locked - cargo +stable install stylance-cli --version 0.8.4 --locked + cargo +1.98.1 install cargo-leptos --version 0.3.7 --locked + cargo +1.98.1 install stylance-cli --version 0.8.4 --locked - name: Build live-search run: | - cargo leptos build --release -p live-search + cargo +1.98.1 leptos build --release -p live-search mkdir -p target/site/pkg stylance live-search --output-file target/site/pkg/live-search.css find target/site/pkg -maxdepth 1 -type f -name '*.js' -size +0c -print -quit | grep -q . find target/site/pkg -maxdepth 1 -type f -name '*.wasm' -size +0c -print -quit | grep -q . test -s target/site/pkg/live-search.css - name: Build i18n-demo - run: cargo leptos build --release -p i18n-demo + run: cargo +1.98.1 leptos build --release -p i18n-demo - name: Show sccache stats if: always() run: ${SCCACHE_PATH} --show-stats @@ -306,14 +322,14 @@ jobs: uses: actions/cache@v5 with: path: .sccache/e2e - key: sccache-e2e-v1-${{ runner.os }}-rust-1.94.0-${{ hashFiles('Cargo.lock', '**/Cargo.toml') }} + key: sccache-e2e-v2-${{ runner.os }}-rust-1.98.1-${{ hashFiles('Cargo.lock', '**/Cargo.toml') }} restore-keys: | - sccache-e2e-v1-${{ runner.os }}-rust-1.94.0- - - name: Install pinned Rust toolchain + sccache-e2e-v2-${{ runner.os }}-rust-1.98.1- + - name: Install current Rust toolchain run: | - rustup toolchain install 1.94.0 --profile minimal --target wasm32-unknown-unknown - rustc --version - cargo --version + rustup toolchain install 1.98.1 --profile minimal --target wasm32-unknown-unknown + rustc +1.98.1 --version + cargo +1.98.1 --version - name: Restore E2E build tools id: e2e-tools-cache uses: actions/cache@v5 @@ -321,12 +337,12 @@ jobs: path: | ~/.cargo/bin/wasm-bindgen ~/.cargo/bin/stylance - key: ci-tools-${{ runner.os }}-wasm-bindgen-cli-0.2.126-stylance-0.8.4 + key: ci-tools-${{ runner.os }}-wasm-bindgen-cli-0.2.126-stylance-0.8.4-rust-1.98.1 - name: Install E2E build tools if: steps.e2e-tools-cache.outputs.cache-hit != 'true' run: | - cargo +stable install wasm-bindgen-cli --version 0.2.126 --locked - cargo +stable install stylance-cli --version 0.8.4 --locked + cargo +1.98.1 install wasm-bindgen-cli --version 0.2.126 --locked + cargo +1.98.1 install stylance-cli --version 0.8.4 --locked - name: Configure Chrome shell: bash run: | @@ -343,8 +359,8 @@ jobs: run: bash scripts/test-e2e.sh - name: Verify SQLx OpenTelemetry span parenting run: >- - cargo test --release --locked -p e2e-tests --test otel_db_test + cargo +1.98.1 test --release --locked -p e2e-tests --test otel_db_test --features otel-tests -- --test-threads=1 --nocapture - name: Show sccache stats if: always() - run: ${SCCACHE_PATH} --show-stats + run: ${SCCACHE_PATH} --show-stats \ No newline at end of file diff --git a/Cargo.toml b/Cargo.toml index 3e3d3a9..3f212b1 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -1,14 +1,15 @@ [workspace] -resolver = "2" +resolver = "3" members = ["crates/config", "crates/domain", "crates/leptos-utils", "gateway", "live-search", "i18n-demo", "e2e-tests"] [workspace.package] version = "0.1.0" edition = "2024" license = "MIT" -# Both Edition 2024 and the current dep matrix require Rust 1.94+. We pin to -# 1.94 in `rust-toolchain.toml` so all contributors build with the same -# toolchain (and wasm32 target). +# Rust 1.94 remains the compatibility floor. Development and production builds +# use the current patched stable toolchain from `rust-toolchain.toml`, while CI +# includes an explicit 1.94.1 MSRV lane. Resolver 3 keeps dependency selection +# aware of member `rust-version` constraints. rust-version = "1.94" [workspace.dependencies] @@ -111,4 +112,4 @@ debug = true strip = false [profile.dev.package."*"] -opt-level = 3 +opt-level = 3 \ No newline at end of file diff --git a/README.md b/README.md index e4a212a..e789032 100644 --- a/README.md +++ b/README.md @@ -18,7 +18,11 @@ Docker builds, and real browser E2E tests. | `crates/domain/` | framework-free domain types and invariants | | `migrations/` | the **single** SQLx migration history used by every service sharing the database | -The workspace uses Edition 2024 and pins Rust **1.94** as its supported toolchain/MSRV. +The workspace uses Edition 2024 with Cargo resolver 3. Rust **1.94** remains the +supported compatibility floor/MSRV, tested on the patched **1.94.1** toolchain. +Normal development, CI, and production builds use patched current stable +**Rust 1.98.1** through `rust-toolchain.toml`. This keeps the compatibility +contract separate from the compiler version used to develop and ship the examples. ## Quick start @@ -205,7 +209,7 @@ shutdown wiring for active connections. ## Build and validation -Basic static/test pass: +Basic static/test pass on the default Rust 1.98.1 toolchain: ```bash cargo check --workspace --all-targets @@ -256,15 +260,22 @@ skipping the coverage CI claims to provide. `.github/workflows/ci.yml` is the executable CI reference. It runs on pull requests and pushes to `main` and covers lockfile consistency, Rust and Leptos -formatting, native Clippy feature combinations, WASM hydration checks, workspace -library tests, `cargo audit`, production Leptos builds, all three Docker images, -and real Chromium-backed E2E tests. - -The workflow pins Rust 1.94 and the helper tool versions it installs. Expensive -Rust jobs reuse compiler state through `actions/cache`, while Docker builds use -per-image BuildKit GitHub Actions layer caches. Keep CI feature coverage and cache -keys in sync whenever supported features, the Rust toolchain, or build tooling -change. +formatting, native Clippy feature combinations, real WASM hydration linking, +workspace library tests, `cargo audit`, production Leptos builds, all three +Docker images, and real Chromium-backed E2E tests. + +Current-stable jobs use Rust **1.98.1**. A separate **1.94.1 MSRV** lane checks +both the native workspace and hydration crates, so adopting new stable APIs does +not silently raise the advertised compatibility floor. Cargo resolver 3 makes +new dependency resolution MSRV-aware. CI also uses Cargo 1.97+'s +`CARGO_BUILD_WARNINGS=deny` rather than changing `RUSTFLAGS`, and WASM validation +performs an actual link so Rust 1.96+'s stricter undefined-symbol behavior is +covered. + +Expensive Rust jobs reuse compiler state through `actions/cache`, while Docker +builds use per-image BuildKit GitHub Actions layer caches. Keep CI feature +coverage and cache keys in sync whenever supported features, the Rust toolchain, +or build tooling change. ## Canonical development notes @@ -281,4 +292,4 @@ important code entry points are: - `e2e-tests/tests/live_search_test.rs` - `.github/workflows/ci.yml` -If documentation and implementation diverge, fix both in the same change. +If documentation and implementation diverge, fix both in the same change. \ No newline at end of file diff --git a/SKILL.md b/SKILL.md index ee66240..dd6b045 100644 --- a/SKILL.md +++ b/SKILL.md @@ -22,8 +22,12 @@ fix this document in the same change. | `migrations/` | the single SQLx migration history for the shared database | | `.github/workflows/ci.yml` | format/check/clippy/build/Docker/browser CI | -The workspace pins Rust 1.94 as its supported toolchain/MSRV. Newer stable Rust -versions do not by themselves justify raising that floor. +The workspace uses Edition 2024 with resolver 3. Rust **1.94** remains the +compatibility floor/MSRV and is tested on patched **1.94.1**. Normal development, +current-stable CI, and production builds use patched **Rust 1.98.1**. Newer +stable Rust versions do not by themselves justify raising the MSRV; the oldest +supported compiler and the preferred compiler for shipping builds are separate +policies. ## Build and test @@ -408,16 +412,24 @@ docker compose --profile dev up --build \ The maintained GitHub Actions workflow should cover: -- native workspace/all-target Clippy plus supported native feature combinations, +- a dedicated patched-MS​​RV lane for Rust 1.94.1, separate from current-stable validation, +- native workspace/all-target Clippy plus supported native feature combinations on Rust 1.98.1, - SSR and hydration feature matrices, +- a real `wasm32-unknown-unknown` link on current stable, not only `cargo check`, - the `otel` feature compilation, - Rust formatting and Leptos view formatting, - dependency audit, - Leptos production builds, -- all Dockerfile builds using a Docker daemon, +- all Dockerfile builds using a Docker daemon and the patched current-stable compiler, - browser E2E with an installed Chromium binary, - a runtime SQLx OTel span-parenting check against real PostgreSQL. +Cargo 1.97+'s `CARGO_BUILD_WARNINGS=deny` is preferred over injecting +`RUSTFLAGS=-Dwarnings` when the goal is to make local-package lint warnings fail +CI without changing compiler cache identities. Keep in mind that linker output is +platform-dependent; investigate newly exposed linker messages rather than +blindly suppressing them. + `--locked` protects the committed dependency graph. CI-installed helper tools must also pin their top-level versions so a crates.io release cannot silently change the workflow's toolchain or MSRV requirements. @@ -436,4 +448,4 @@ Particularly useful entry points: - `gateway/src/settings.rs` - `e2e-tests/src/common/live_search_env.rs` - `e2e-tests/tests/live_search_test.rs` -- `.github/workflows/ci.yml` +- `.github/workflows/ci.yml` \ No newline at end of file diff --git a/gateway.Dockerfile b/gateway.Dockerfile index 61053b3..8996b8f 100644 --- a/gateway.Dockerfile +++ b/gateway.Dockerfile @@ -2,12 +2,12 @@ # # Multi-stage build with cargo-chef for reproducible dependency caching # across the whole workspace. -FROM rust:1.94-bookworm@sha256:6ae102bdbf528294bc79ad6e1fae682f6f7c2a6e6621506ba959f9685b308a55 AS chef +FROM rust:1.98.0-bookworm@sha256:82150a52ec202c1b14d7817e14516c392bb7f5cfebd88f1ed531cb37ebd39922 AS chef +# The official 1.98 image carries 1.98.0; install the patched stable compiler +# explicitly so production builds do not stay on a known superseded point release. +RUN rustup toolchain install 1.98.1 --profile minimal +ENV RUSTUP_TOOLCHAIN=1.98.1 RUN cargo install cargo-chef --locked -# Keep the dependency cook and final source build on the same rustup toolchain. -# Otherwise the later COPY of rust-toolchain.toml can change Cargo's compiler -# identity and invalidate the cooked dependency artifacts. -ENV RUSTUP_TOOLCHAIN=1.94.0 WORKDIR /build FROM chef AS planner @@ -38,4 +38,4 @@ EXPOSE 3001 # Production: pass JWT_PRIVATE_KEY_PEM / JWT_PUBLIC_KEY_PEM / ADMIN_PASSWORD / # ADMIN_USER_ID / DATABASE_URL via the deployment platform. Use --dev-keys only # with ALLOW_DEV_KEYS=1. -CMD ["/app/gateway-example"] +CMD ["/app/gateway-example"] \ No newline at end of file diff --git a/i18n-demo.Dockerfile b/i18n-demo.Dockerfile index 6e38d07..8e96ba5 100644 --- a/i18n-demo.Dockerfile +++ b/i18n-demo.Dockerfile @@ -1,11 +1,12 @@ # Pinned by digest for reproducible builds. # # Multi-stage build for the i18n-demo Leptos crate. -FROM rust:1.94-bookworm@sha256:6ae102bdbf528294bc79ad6e1fae682f6f7c2a6e6621506ba959f9685b308a55 AS chef +FROM rust:1.98.0-bookworm@sha256:82150a52ec202c1b14d7817e14516c392bb7f5cfebd88f1ed531cb37ebd39922 AS chef +# The official 1.98 image carries 1.98.0; install the patched stable compiler +# explicitly so production builds do not stay on a known superseded point release. +RUN rustup toolchain install 1.98.1 --profile minimal +ENV RUSTUP_TOOLCHAIN=1.98.1 RUN cargo install cargo-chef --locked -# Keep cargo-chef and the real build on one compiler identity even after the -# repository's rust-toolchain.toml is copied into the workspace. -ENV RUSTUP_TOOLCHAIN=1.94.0 WORKDIR /build FROM chef AS planner @@ -49,4 +50,4 @@ ENV LEPTOS_OUTPUT_NAME=i18n_demo ENV LEPTOS_SITE_PKG_DIR=/app/pkg USER app EXPOSE 3002 -CMD ["/app/i18n-demo"] +CMD ["/app/i18n-demo"] \ No newline at end of file diff --git a/live-search.Dockerfile b/live-search.Dockerfile index af750d8..eac0e4e 100644 --- a/live-search.Dockerfile +++ b/live-search.Dockerfile @@ -5,11 +5,12 @@ # 2. planner: produce a recipe.json over the whole workspace. # 3. builder: cargo chef cook the recipe (cached dependency build), # then copy source and build the binary. -FROM rust:1.94-bookworm@sha256:6ae102bdbf528294bc79ad6e1fae682f6f7c2a6e6621506ba959f9685b308a55 AS chef +FROM rust:1.98.0-bookworm@sha256:82150a52ec202c1b14d7817e14516c392bb7f5cfebd88f1ed531cb37ebd39922 AS chef +# The official 1.98 image carries 1.98.0; install the patched stable compiler +# explicitly so production builds do not stay on a known superseded point release. +RUN rustup toolchain install 1.98.1 --profile minimal +ENV RUSTUP_TOOLCHAIN=1.98.1 RUN cargo install cargo-chef --locked -# Keep cargo-chef and the real build on one compiler identity even after the -# repository's rust-toolchain.toml is copied into the workspace. -ENV RUSTUP_TOOLCHAIN=1.94.0 WORKDIR /build FROM chef AS planner @@ -63,4 +64,4 @@ ENV LEPTOS_OUTPUT_NAME=live_search ENV LEPTOS_SITE_PKG_DIR=/app/pkg USER app EXPOSE 3000 -CMD ["/app/live-search"] +CMD ["/app/live-search"] \ No newline at end of file diff --git a/live-search/src/lib.rs b/live-search/src/lib.rs index f25a070..c3b27f5 100644 --- a/live-search/src/lib.rs +++ b/live-search/src/lib.rs @@ -5,6 +5,15 @@ //! - WASM hydration client //! - `PostgreSQL` full-text search with LISTEN/NOTIFY SSE streaming +// `TableRow` 0.19/derive 0.15 generates async trait methods whose bodies are +// immediately ready. Clippy 1.98's `unused_async_trait_impl` fires in that +// generated code. Keep this scoped to the module that invokes the derive, and +// make it an expectation so a future macro upgrade that fixes the expansion +// turns this suppression stale and CI asks us to remove it. +#[expect( + clippy::unused_async_trait_impl, + reason = "leptos-struct-table TableRow derive generates immediately-ready async trait methods" +)] pub mod app; pub mod db; pub mod events; diff --git a/rust-toolchain.toml b/rust-toolchain.toml index 03a91da..d6b865a 100644 --- a/rust-toolchain.toml +++ b/rust-toolchain.toml @@ -1,4 +1,4 @@ [toolchain] -channel = "1.94.0" +channel = "1.98.1" components = ["rustfmt", "clippy"] -targets = ["wasm32-unknown-unknown"] +targets = ["wasm32-unknown-unknown"] \ No newline at end of file