Re: [PATCH RFC 2/3] rust: implement a test balloon via the "varint" subsystem
- From
brian m. carlson <sandals@crustytoothpaste.net>
- Date
- Sep 4, 2025, 22:37 UTC
- Message-ID
- <aLoUuxfQmxHdqiYe@fruit.crustytoothpaste.net>
- In-Reply-To
- <20250904-b4-pks-rust-breaking-change-v1-2-3af1d25e0be9@pks.im>
On 2025-09-04 at 14:26:44, Patrick Steinhardt wrote:
Show 21 quoted lines
> diff --git a/meson.build b/meson.build
> index 1c0e98bbc14..b52a68b0bb6 100644
> --- a/meson.build
> +++ b/meson.build
> @@ -522,7 +522,6 @@ libgit_sources = [
> 'usage.c',
> 'userdiff.c',
> 'utf8.c',
> - 'varint.c',
> 'version.c',
> 'versioncmp.c',
> 'walker.c',
> @@ -1713,6 +1712,10 @@ rust_option = get_option('rust').disable_auto_if(not rust_available)
>
> if rust_option.allowed() and meson.version().version_compare('>=1.9.0')
> subdir('src')
> +else
> + libgit_sources += [
> + 'varint.c',
> + ]
> endifCan we also add a #define constant when building? For instance, if I'm writing interop code in Rust, I'll need to be able to do something like this:
int do_foobar()
{
#ifdef RUST
/* Call some code */
#else
die(_("interoperability not supported"));
#endif
}-- brian m. carlson (they/them) Toronto, Ontario, CA