Our breaking changes document says that we'll enable Rust by default in
Git 2.54. Adjust the Makefile to switch the option from WITH_RUST to
NO_RUST to enable it by default and update the help text accordingly.
Similarly, for Meson, enable the option by default and do not
automatically disable it if Cargo is missing, since the goal is to help
users find where they are likely to have problems in the future.
Update our CI tests to swap out the single Linux job with Rust to a
single job without, both for Makefile and Meson. Similarly, update the
Windows Makefile job to not use Rust, while the Meson job (which does
not build with ci/lib.sh) will default to having it enabled.
Move the check for Cargo in the Meson build because it is no longer
needed in the main script.
Signed-off-by: brian m. carlson <sandals@crustytoothpaste.net>
Signed-off-by: Junio C Hamano <gitster@pobox.com>
brian m. carlson committedApr 9, 2026 at 22:44 UTC32d5b905909e781786c4735e6bd71503b23e4fb1
6 files changed+15-10
Makefile
+5-5
index dbf0022054..84b59959de 100644--- a/Makefile+++ b/Makefile@@ -498,9 +498,9 @@ include shared.mak # # == Optional Rust support == #-# Define WITH_RUST if you want to include features and subsystems written in-# Rust into Git. For now, Rust is still an optional feature of the build-# process. With Git 3.0 though, Rust will always be enabled.+# Define NO_RUST if you want to disable features and subsystems written in Rust+# from being compiled into Git. For now, Rust is still an optional feature of+# the build process. With Git 3.0 though, Rust will always be enabled. # # Building Rust code requires Cargo. #@@ -1351,7 +1351,7 @@ LIB_OBJS += urlmatch.o LIB_OBJS += usage.o LIB_OBJS += userdiff.o LIB_OBJS += utf8.o-ifndef WITH_RUST+ifdef NO_RUST LIB_OBJS += varint.o endif LIB_OBJS += version.o@@ -1590,7 +1590,7 @@ endif ALL_CFLAGS = $(DEVELOPER_CFLAGS) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_APPEND) ALL_LDFLAGS = $(LDFLAGS) $(LDFLAGS_APPEND)-ifdef WITH_RUST+ifndef NO_RUST BASIC_CFLAGS += -DWITH_RUST GITLIBS += $(RUST_LIB) ifeq ($(uname_S),Windows)