From fffee9f0b59fbb36983b5d5f6bd0ebb1f2230a76 Mon Sep 17 00:00:00 2001 From: DanS Date: Thu, 23 Jul 2026 21:30:16 -0500 Subject: [PATCH] build(lite-backend): pin the SDXL backend to rustc 1.63 via rust-toolchain.toml MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit The pinned librustzcash / transitive crates (notably traitobject 0.1.0) rely on pre-1.70 trait coherence and fail to compile on newer rustc (E0119), so the backend must build with 1.63. Add a rust-toolchain.toml in the vendored backend so rustup auto-selects 1.63 when cargo runs there — no more manual RUSTUP_TOOLCHAIN=1.63.0. The pin is scoped to the backend tree (repo-root cargo keeps the default toolchain). Also symlink the pin into the prepared build root so --silentdragonxlitelib-dir builds honor it too. Co-Authored-By: Claude Opus 4.8 (1M context) --- scripts/build-lite-backend-artifact.sh | 3 +++ .../silentdragonxlite/lib/rust-toolchain.toml | 12 ++++++++++++ 2 files changed, 15 insertions(+) create mode 100644 third_party/silentdragonxlite/lib/rust-toolchain.toml diff --git a/scripts/build-lite-backend-artifact.sh b/scripts/build-lite-backend-artifact.sh index f83072c..6e600ea 100755 --- a/scripts/build-lite-backend-artifact.sh +++ b/scripts/build-lite-backend-artifact.sh @@ -324,6 +324,9 @@ prepare_backend_source() { ln -s "$BACKEND_SOURCE_DIR/src" "$prepared_root/src" [[ -f "$BACKEND_SOURCE_DIR/Cargo.lock" ]] && ln -s "$BACKEND_SOURCE_DIR/Cargo.lock" "$prepared_root/Cargo.lock" [[ -d "$BACKEND_SOURCE_DIR/.cargo" ]] && ln -s "$BACKEND_SOURCE_DIR/.cargo" "$prepared_root/.cargo" + # Honor the pinned Rust toolchain (rust-toolchain.toml) inside the prepared root too, + # so builds using --silentdragonxlitelib-dir still select rustc 1.63. + [[ -f "$BACKEND_SOURCE_DIR/rust-toolchain.toml" ]] && ln -s "$BACKEND_SOURCE_DIR/rust-toolchain.toml" "$prepared_root/rust-toolchain.toml" [[ -d "$BACKEND_SOURCE_DIR/libsodium-mingw" ]] && ln -s "$BACKEND_SOURCE_DIR/libsodium-mingw" "$prepared_root/libsodium-mingw" # Vendored crate deps (offline builds): the .cargo/config.toml's vendored-sources directory is # "vendor" relative to the build root, so expose it inside the prepared root too. diff --git a/third_party/silentdragonxlite/lib/rust-toolchain.toml b/third_party/silentdragonxlite/lib/rust-toolchain.toml new file mode 100644 index 0000000..35f85f2 --- /dev/null +++ b/third_party/silentdragonxlite/lib/rust-toolchain.toml @@ -0,0 +1,12 @@ +# Rust toolchain pin for the vendored SilentDragonXLite (SDXL) backend. +# +# The pinned librustzcash + transitive crates (notably traitobject 0.1.0) rely on +# pre-1.70 trait-coherence rules and fail to compile on newer rustc with +# error[E0119]: conflicting implementations of trait `Trait` for type `(dyn Send + Sync)` +# so the backend must be built with 1.63 (the toolchain scripts/build-lite-backend-artifact.sh +# and CLAUDE.md target). rustup auto-selects this when cargo runs in this tree, so no +# RUSTUP_TOOLCHAIN / `cargo +1.63.0` is needed. +# +# Install it once with: rustup toolchain install 1.63.0 +[toolchain] +channel = "1.63.0"