Re: [PATCH 10/14] rust: add a build.rs script for tests
From: Ezekiel Newren <hidden>
Date: 2025-10-31 22:44:07
On Thu, Oct 30, 2025 at 7:54 AM Junio C Hamano [off-list ref] wrote:
Patrick Steinhardt [off-list ref] writes:quoted
The question I have here is what the benefit would be to have separate libraries.Mostly flexibility. If we do not value it, then that is OK, though. And personally I would have to say that "meson rolled everything into a single library archive" is a bad excuse---whatever came later doing things differently from the incumbent has to have a good reason to do things differently, or it is a regression.
I don't understand why "Simplify Cargo's job of linking with the build systems of Makefile and Meson" Isn't a good enough reason by itself. Nor do I understand why having libxdiff.a and libreftable.a produces a better developer experience. My developer experience has been strictly worse because of this separation. If we keep Makefile the way that it was and change Meson to also produce separate static libraries then we'll need to keep 3 build systems in sync with each other. If we roll everything into libgit.a then Cargo only ever needs to know about that static library, Meson doesn't change, and there's no question about where new object files should be added in Makefile. If we do add a 3rd conceptual stand alone library then we'd only need to add the source files to Makefile and Meson, but if we insist on separate static libraries then we'll have to add the source files (as usual) and make sure that Makefile, Meson, and Cargo are all in agreement about the static libraries being produced.