Repository navigation
Include Rust in the minimal-sdk/makepkg-git/build-installers SDK artifacts - #132
Merged
Merged
Conversation
mjcheetham
approved these changes
Sep 28, 2026
Member
There was a problem hiding this comment.
This comes at a bit of a hefty price; the build-installers.tar.zst increases size from 188,577,828 to 301,498,112 bytes.
This is a shame, but not much we can do right? ¯\_(ツ)_/¯
This was referenced Sep 28, 2026
dscho
added a commit
that referenced
this pull request
Nov 4, 2026
## Summary Prepare package-update automation to store Rust's LLVM DLL through the UPX clean filter, preserving original package bytes in the working tree. - Configure repository-local filters before staging in `.github/commit-sdk.sh`, using `--no-refresh`. - Stop before staging if filter setup fails. - Select only `ucrt64/bin/libLLVM-22.dll` with `filter=upx`. Ordinary clones retain runnable packed binaries. Users can optionally enable smudge filtering to trade disk space for faster loading. ## Follow-ups This does not install Rust or LLVM. Updating the package-install workflow on Rust PR #132 is a follow-up. No installation workflow has been dispatched. ## Validation Disposable repository tests verified setup runs before staging, successful commits leave working-tree bytes unchanged, and setup failure prevents staging and committing. Attribute checks confirmed only the intended LLVM DLL is selected. Shell syntax and whitespace checks passed.
dscho
force-pushed
the
include-rust-in-makepkg-git
branch
3 times, most recently
from
November 24, 2026 10:11
9feea02 to
21dcab8
Compare
Thanks to yours truly, there was a `grep` update that was long overdue, but it resulted in a change: `grep` now depends on PCRE2 instead of PCRE1, and we need to ship the new dependency in the minimal SDK as well. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
When `commit-sdk.sh` commits DLLs that exceed GitHub's maximum blob size (`libLLVM-*.dll`), it uses a clean/smudge filter that runs `upx` to pack them. `upx` is installed in `/ucrt64/bin`, but nothing else in that step puts that directory on the `PATH`. The same problem already broke the sync in git-sdk-arm64 (fixed there in c014e0a): https://github.com/git-for-windows/git-sdk-arm64/actions/runs/45254159505 Here, the sync has only been spared so far because the SDK does not yet contain any libLLVM DLL. That will change as soon as Rust (which needs libLLVM) is installed, which is what this work is preparing for. Assisted-by: GitHub Copilot (Auto) Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Rust needs to enter the SDK so that we can have "time-traveling" branches for security bug fix releases and MinGit backports. The safest way to install Rust is by running the `pacman -S` command in a clean, pristine SDK checkout in a GitHub workflow, so that it's not only virtually guaranteed that it's not tampered with, there is also a public record. Assisted-by: GPT-6 Sol Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
dscho
force-pushed
the
include-rust-in-makepkg-git
branch
from
November 25, 2026 22:09
21dcab8 to
1a8dfdf
Compare
Upstream Git plans to make its Rust parts mandatory with v3.0, and Git for Windows will enable them already after v2.56. Let's include what is needed to build them in the minimal SDK, which is what Git's CI uses. Since the `git-sdk-x86_64-build-installers` artifact is the minimal SDK plus the `makepkg-git` sparse checkout, it gets them, too. The UCRT64 Rust package targets `x86_64-pc-windows-gnu`, and Cargo's default linker for that target is `x86_64-w64-mingw32-gcc`. Without it, the build fails with "error: linker `x86_64-w64-mingw32-gcc` not found". `libsynchronization.a` is included as well because the ARM64 counterpart (git-for-windows#67) needed it to link, and the Rust standard library is the same on both architectures. Shipping the prefixed name means nobody has to set `CARGO_TARGET_X86_64_PC_WINDOWS_GNU_LINKER=gcc` in every environment. The file is byte-identical to `gcc.exe`, and `please.sh create-sdk-artifact` hard-links identical files (see git-for-windows/build-extra#777), so the extra name costs practically nothing in the archive. This does make the artifact substantially larger. For reference, the ARM64 counterpart grew the zstd-compressed (level 10) build-installers artifact from ~243MB to ~317MB, and the minimal SDK from ~121MB to ~194MB. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
The minimal SDK now has what it takes to build Git's Rust parts, so there's no reason to keep passing `NO_RUST=UnfortunatelyYes` to the test build. Let's drop it. That way, this job checks that the minimal SDK really can build Git with Rust, and the downstream test jobs exercise that build. Signed-off-by: Johannes Schindelin <johannes.schindelin@gmx.de>
mingw-w64-ucrt-x86_64-http-parser (new: 2.9.4-3) mingw-w64-ucrt-x86_64-libgit2 (new: 1.9.7-3) mingw-w64-ucrt-x86_64-libxml2 (new: 2.15.4-3) mingw-w64-ucrt-x86_64-llvm-libs (new: 23.1.5-1) mingw-w64-ucrt-x86_64-rust (new: 1.100.0-2) Signed-off-by: Git for Windows Build Agent <ci@git-for-windows.build>
Rust is now installed via pacman, and the SDK package changes have been committed. Retire the workflow so later pushes to the PR branch do not repeat the installation. Generated by https://github.com/dscho/git-sdk-64/actions/runs/45710852716 Signed-off-by: Git for Windows Build Agent <ci@git-for-windows.build>
dscho
force-pushed
the
include-rust-in-makepkg-git
branch
from
November 25, 2026 22:52
8f5ab85 to
c85675c
Compare
Member
Author
|
Despite the hefty price, I actually decided to go the whole nine yards and include Rust also in the minimal SDK. Yes, this will make each Windows-based CI job a bit more expensive. At the same time, it will make CI more consistent, too: GitLab and GitHub CI can then use the precise same compilers even when Git v3.0 will require Rust to be built. |
makepkg-git/build-installers SDK artifactsminimal-sdk/makepkg-git/build-installers SDK artifacts
dscho
added a commit
to git-for-windows/git-sdk-arm64
that referenced
this pull request
Nov 25, 2026
…K artifacts (#67) This comes at a bit of a hefty price; the `build-installers.tar.zst` increases size from ~243MB to ~317MB (although that is less of a delta than for the sibling PR git-for-windows#132), while `minimal-sdk.tar.zst` increases from ~121MB to ~194MB. The upside is that we're staying consistent with the MSYS2 project instead of mixing a MSYS2-provided Clang with a Rust-provided Cargo targeting Clang.
dscho
added a commit
to git-for-windows/git-for-windows-automation
that referenced
this pull request
Nov 26, 2026
This covers the remaining checkbox of git-for-windows/git#6276 ("Build with the Rust bits by default") for the release builds. All the prerequisites are now merged: git-for-windows/MINGW-packages#235 on 2026-11-12, and git-for-windows/git-sdk-64#132 and git-for-windows/git-sdk-arm64#67 earlier today, which add the Rust toolchain to the SDK artifacts these workflows use. The `git-artifacts` workflows in git-sdk-64 and git-sdk-arm64 have opt-outs of their own; those are reverted in separate PRs in those repositories. git-sdk-32 keeps its opt-out, as there is no usable i686 Rust.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This comes at a bit of a hefty price; the
build-installers.tar.zstincreases size from ~183MB to ~297MB, whileminimal-sdk.tar.zstincreases from ~61MB to ~176MB.The upside is that we're staying consistent with the MSYS2 project instead of mixing a MSYS2-provided MINGW GCC with a Rust-provided Cargo targeting MINGW GCC.