diff --git a/.github/workflows/flutter-build.yml b/.github/workflows/flutter-build.yml index 91c84416d..9c3be51b6 100644 --- a/.github/workflows/flutter-build.yml +++ b/.github/workflows/flutter-build.yml @@ -492,11 +492,20 @@ jobs: version: ${{ env.LLVM_VERSION }} - name: Install Rust toolchain - uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9 # v1 - with: - toolchain: nightly-2023-10-13-${{ matrix.job.target }} # must use nightly here, because of abi_thiscall feature required - targets: ${{ matrix.job.target }} - components: "rustfmt" + shell: bash + run: | + # Sciter's abi_thiscall feature requires nightly Rust. + # Use an i686 host toolchain so build scripts can load the 32-bit LLVM installed above. + # Since rustup 1.29.1, i686 toolchains on x64 Windows require --force-non-host + # for both installation and default selection, even though WOW64 can run them. + # See https://github.com/rust-lang/rustup/pull/4935. + # Alternatively, an x64 compiler could use cargo build --target i686-pc-windows-msvc. + # This requires 64-bit LLVM for host build scripts and updated packaging paths, + # and has not been manually verified for RustDesk. + rustup toolchain install nightly-2023-10-13-${{ matrix.job.target }} \ + --target ${{ matrix.job.target }} --component rustfmt \ + --profile minimal --no-self-update --force-non-host + rustup default nightly-2023-10-13-${{ matrix.job.target }} --force-non-host - uses: Swatinem/rust-cache@e18b497796c12c097a38f9edb9d0641fb99eee32 # v2 with: