git/list[1] front-page[2] threads[3] people[4] search[5] about
 

[PATCH v2 0/2] Use Rust in the Windows CI jobs

From
Johannes Schindelin via GitGitGadget <gitgitgadget@gmail.com>
Date
Sep 11, 2026, 19:08 UTC
Message-ID
<pull.2213.v2.git.1789153730.gitgitgadget@gmail.com>
In-Reply-To
<pull.2213.git.1788272509.gitgitgadget@gmail.com>

With v2.55.0, Git requires Rust by default, with an opt-out that is intended to be dropped in one of the next versions.

Due to the special circumstances in the Windows part of the CI builds, each Windows build job first downloads a "minimal Git for Windows SDK" that contains the GCC toolchain required to build and test Git. As a consequence, brian m. carlson opted out of Rust in Git's CI definition in 32d5b905909e (Enable Rust by default, 2026-04-09).

So: How could we stop opting out? Notably, Rust is not part of that minimal
Git for Windows SDK, and including it would more than double that payload,
which I consider prohibitive. Yet including Rust in the minimal Git for
Windows SDK is not actually necessary, at least not for the GitHub workflow:
The runners on which this workflow is defined to run come with Rust
pre-installed.

Granted, this Rust installation is configured to target the Windows-native C compiler, Visual C. To accommodate for the Windows CI job building with GCC, this patch series adds a step to the workflow that ensures that the needed Rust bits are installed and configured.

RFH: I haven't been able to confirm that GitLab's Windows runners come with
Rust preinstalled,
https://docs.gitlab.com/ci/runners/hosted_runners/windows/#available-runtimes
did not clarify that for me. Patrick (or anyone else with access to GitLab
CI), could you see whether this patch series builds on
saas-windows-medium-amd64 without need for further changes?
Changes since v1:
 * The inconsistency pointed out by Junio, that UCRT64 was once marked as
   using clang and once as using gcc was fixed by clarifying that UCRT64
   uses GCC.
Johannes Schindelin (2):
  rust: pick a GCC-compatible Cargo target under MSYS2/MinGW
  ci(windows): build with Rust
 .github/workflows/main.yml | 24 ++++++++++++++++++++++++
 Makefile                   |  3 ++-
 ci/lib.sh                  |  3 ---
 config.mak.uname           | 24 +++++++++++++++++++++++-
 4 files changed, 49 insertions(+), 5 deletions(-)
base-commit: f4742f3165d096130c39a71feb26374da37620f2
Published-As: https://github.com/gitgitgadget/git/releases/tag/pr-2213%2Fdscho%2Fuse-rust-in-windows-ci-builds-v2
Fetch-It-Via: git fetch https://github.com/gitgitgadget/git pr-2213/dscho/use-rust-in-windows-ci-builds-v2
Pull-Request: https://github.com/gitgitgadget/git/pull/2213
Range-diff vs v1:
 1:  2b7f58a037 = 1:  6567eceb32 rust: pick a GCC-compatible Cargo target under MSYS2/MinGW
 2:  7a24630fb9 ! 2:  07415393e5 ci(windows): build with Rust
     @@ Commit message
          linker) need to be installed; `rustup target add` alone is sufficient.
      
          Assisted-by: Claude Opus 4.7
     +    Helped-by: Junio C Hamano <gitster@pobox.com>
          Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
      
       ## .github/workflows/main.yml ##
     @@ .github/workflows/main.yml: jobs:
      +        CLANGARM64) target=aarch64-pc-windows-gnullvm ;;
      +        CLANG64)    target=x86_64-pc-windows-gnullvm  ;;
      +        CLANG32)    target=i686-pc-windows-gnullvm    ;;
     -+        UCRT64)     target=x86_64-pc-windows-gnullvm  ;;
     ++        UCRT64)     target=x86_64-pc-windows-gnu      ;;
      +        MINGW64)    target=x86_64-pc-windows-gnu      ;;
      +        MINGW32)    target=i686-pc-windows-gnu        ;;
      +        *) echo "::error::Unsupported MSYSTEM: $MSYSTEM"; exit 1 ;;
-- 
gitgitgadget
Previous: Johannes Schindelin via GitGitGadgetNext: Johannes Schindelin via GitGitGadget
Message 6 of 21 in “Use Rust in the Windows CI jobs”
  1. 0/2 Use Rust in the Windows CI jobsJohannes Schindelin via GitGitGadget, Sep 1, 2026
  2. 1/2 rust: pick a GCC-compatible Cargo target under MSYS2/MinGWJohannes Schindelin via GitGitGadget, Sep 1, 2026
  3. Junio C HamanoSep 2, 2026
  4. Johannes SchindelinSep 11, 2026
  5. 2/2 ci(windows): build with RustJohannes Schindelin via GitGitGadget, Sep 1, 2026
  6. 0/2 Use Rust in the Windows CI jobsJohannes Schindelin via GitGitGadget, Sep 11, 2026
  7. 2/2 ci(windows): build with RustJohannes Schindelin via GitGitGadget, Sep 11, 2026
  8. 1/2 rust: pick a GCC-compatible Cargo target under MSYS2/MinGWJohannes Schindelin via GitGitGadget, Sep 11, 2026
  9. Junio C HamanoSep 11, 2026
  10. James Le CuirotSep 11, 2026
  11. Johannes SchindelinSep 13, 2026
  12. 0/2 Use Rust in the Windows CI jobsJohannes Schindelin via GitGitGadget, Sep 13, 2026
  13. 1/2 rust: pick a GCC-compatible Cargo target under MSYS2/MinGWJohannes Schindelin via GitGitGadget, Sep 13, 2026
  14. 2/2 ci(windows): build with RustJohannes Schindelin via GitGitGadget, Sep 13, 2026
  15. 0/2 Use Rust in the Windows CI jobsJohannes Schindelin via GitGitGadget, Sep 13, 2026
  16. 1/2 rust: pick a GCC-compatible Cargo target under MSYS2/MinGWJohannes Schindelin via GitGitGadget, Sep 13, 2026
  17. 2/2 ci(windows): build with RustJohannes Schindelin via GitGitGadget, Sep 13, 2026
  18. Junio C HamanoSep 13, 2026
  19. Junio C HamanoSep 18, 2026
  20. Johannes SchindelinSep 21, 2026
  21. Junio C HamanoSep 21, 2026

Read the whole thread, see it on lore, or plain text.

$ cat FOOTERMessages come from the public archive at lore.kernel.org/git, fetched every hour. The front page is chosen and written each morning by an AI editor and can be wrong; the threads themselves are the record. About and API. For agents: an MCP server at https://gitlist.dev/mcp, and any thread, story or person page as Markdown by adding .md to its URL (or sending Accept: text/markdown). Details in /llms.txt.