Re: [PATCH RFC 1/3] meson: add infrastructure to build internal Rust library
- From
Junio C Hamano <gitster@pobox.com>
- Date
- Sep 4, 2025, 18:50 UTC
- Message-ID
- <xmqqzfba6oih.fsf@gitster.g>
- In-Reply-To
- <20250904-b4-pks-rust-breaking-change-v1-1-3af1d25e0be9@pks.im>
Patrick Steinhardt <ps@pks.im> writes:
> Add the infrastructure into Meson to build an internal Rust library.
I am a bit surprised that Meson needs to learn Rust now. How have you been dealing with contrib/libgit-{sys,rs}?
Show 19 quoted lines
> Building the Rust parts of Git are for now entirely optional, as they > are mostly intended as a test balloon for both Git developers, but also > for distributors of Git. So for now, they may contain: > > - New features that are not mission critical to Git and that users can > easily live without. > > - Alternative implementations of small subsystems. > > If these test balloons are successful, we will eventually make Rust a > mandatory dependency for our build process in Git 3.0. > > The availability of a Rust toolchain will be auto-detected by Meson at > setup time. This behaviour can be tweaked via the `-Drust=` feature > toggle. > > Next to the linkable Rust library, also wire up tests that can be > executed via `meson test`. This allows us to use the native unit testing > capabilities of Rust.
OK.
Show 7 quoted lines
> Signed-off-by: Patrick Steinhardt <ps@pks.im> > --- > meson.build | 16 +++++++++++++++- > meson_options.txt | 2 ++ > src/lib.rs | 0 > src/meson.build | 12 ++++++++++++ > 4 files changed, 29 insertions(+), 1 deletion(-)