]> git.ipfire.org Git - thirdparty/git.git/commit
rust: support for Windows
authorPatrick Steinhardt <ps@pks.im>
Wed, 15 Oct 2025 06:04:10 +0000 (08:04 +0200)
committerJunio C Hamano <gitster@pobox.com>
Wed, 15 Oct 2025 15:10:17 +0000 (08:10 -0700)
commite509b5b8be0f17467dcc75130f941d84a09d96a3
tree7b47b68e79c4f0011bd64318adb5a064f5c62ced
parent1b43384f41d8303324e8e6717dcf109e8846c214
rust: support for Windows

The initial patch series that introduced Rust into the core of Git only
cared about macOS and Linux. This specifically leaves out Windows, which
indeed fails to build right now due to two issues:

  - The Rust runtime requires `GetUserProfileDirectoryW()`, but we don't
    link against "userenv.dll".

  - The path of the Rust library built on Windows is different than on
    most other systems systems.

Fix both of these issues to support Windows.

Note that this commit fixes the Meson-based job in GitHub's CI. Meson
auto-detects the availability of Rust, and as the Windows runner has
Rust installed by default it already enabled Rust support there. But due
to the above issues that job fails consistently.

Install Rust on GitLab CI, as well, to improve test coverage there.

Based-on-patch-by: Johannes Schindelin <johannes.schindelin@gmx.de>
Based-on-patch-by: Ezekiel Newren <ezekielnewren@gmail.com>
Signed-off-by: Patrick Steinhardt <ps@pks.im>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
.gitlab-ci.yml
Makefile
meson.build
src/cargo-meson.sh