build(lite-backend): pin the SDXL backend to rustc 1.63 via rust-toolchain.toml
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) <noreply@anthropic.com>
This commit is contained in:
@@ -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.
|
||||
|
||||
12
third_party/silentdragonxlite/lib/rust-toolchain.toml
vendored
Normal file
12
third_party/silentdragonxlite/lib/rust-toolchain.toml
vendored
Normal file
@@ -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"
|
||||
Reference in New Issue
Block a user