Subject: Re: [PATCH 4/4] Enable Rust by default

From: Patrick Steinhardt <[email-masked]>
Date: Wed, 8 Apr 2026 12:12:23 +0200

On Fri, Apr 03, 2026 at 01:12:49AM +0000, brian m. carlson wrote:
> diff --git a/ci/run-build-and-tests.sh b/ci/run-build-and-tests.sh
> index 28cfe730ee..bf1fdbe968 100755
> --- a/ci/run-build-and-tests.sh
> +++ b/ci/run-build-and-tests.sh
> @@ -10,7 +10,6 @@ export TEST_CONTRIB_TOO=yes
>  case "$jobname" in
>  fedora-breaking-changes-musl|linux-breaking-changes)
>  	export WITH_BREAKING_CHANGES=YesPlease
> -	export WITH_RUST=YesPlease
>  	MESONFLAGS="$MESONFLAGS -Dbreaking_changes=true"
>  	MESONFLAGS="$MESONFLAGS -Drust=enabled"

I guess we can drop this flag, as well.

> @@ -30,6 +29,7 @@ linux-TEST-vars)
>  	export GIT_TEST_PACK_USE_BITMAP_BOUNDARY_TRAVERSAL=1
>  	;;
>  linux-clang)
> +	export NO_RUST=UnfortunatelyYes
>  	export GIT_TEST_DEFAULT_HASH=sha1
>  	;;
>  linux-sha256)

Do we also want to to adjust one of the Meson-based jobs to not run with
Rust?

> diff --git a/meson.build b/meson.build
> index 8309942d18..4e1a58ee01 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -1746,7 +1746,7 @@ version_def_h = custom_target(
>  libgit_sources += version_def_h
>  
>  cargo = find_program('cargo', dirs: program_path, native: true, required: get_option('rust'))

We should probably move this line into "src/meson.build".

> -rust_option = get_option('rust').disable_auto_if(not cargo.found())
> +rust_option = get_option('rust')
>  if rust_option.allowed()
>    subdir('src')
>    libgit_c_args += '-DWITH_RUST'

Patrick