public inbox for git@vger.kernel.org 
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox•com>
To: Josh Steadmon <steadmon@google•com>
Cc: Eric Sunshine <sunshine@sunshineco•com>,
	 git@vger•kernel.org,
	 "brian m. carlson" <sandals@crustytoothpaste•net>,
	 Phillip Wood <phillip.wood123@gmail•com>
Subject: Re: [PATCH v2 2/5] libgit-sys: add symlink to git repo root and build out of tree
Date: Tue, 25 Mar 2025 16:08:18 -0700	[thread overview]
Message-ID: <xmqqy0wslndp.fsf@gitster.g> (raw)
In-Reply-To: <5qvxvuquk2yuyoyoctz2ji6sj4yld4ridig24elpoiytghlovw@a5hgdufrchwr> (Josh Steadmon's message of "Tue, 25 Mar 2025 10:57:11 -0700")

Josh Steadmon <steadmon@google•com> writes:

> 2) keeping the top-level clean of any Rust code or configuration.
>
> If we're willing to have a Cargo.toml file in the repo root, ...

If it is more like adding a new build configuration file whereever
we have Makefile (or meson.build), and is not like we are adding one
new file per one existing source file, then I see no reason why we
want to avoid adding a few files to the root-level.

> ... we could
> create a "Cargo workspace", but I'm not sure yet if that avoids the same
> problem with accessing sources outside of the crates themselves. I'll be
> able to test it out later this week.

Yeah, that would probably be a reasonable thing to try.  Thanks.


> If the workspace approach doesn't work, the alternatives are:
>
> 1) avoid the issue for now; anyone who wants to experiment with
> libgit-rs can do so by building from source (but it will prevent them
> from creating their own packaged crates IIUC).
>
> 2) move libgit-sys and libgit-rs to separate repos and depend on the Git
> source via submodules. This is what I've seen done in other -sys crates
> such as zlib-sys (https://github.com/rust-lang/libz-sys).
>
> Of those alternatives, I prefer #1 for now. If we build enough momentum
> on libification and expanding the coverage of these crates, then we
> could think about switching to #2.

Yeah, or putting it another way, #1 would help us gather enough Rust
minded folks who are familiar enough to come up with ideas and offer
better ways to manage this part of the system.

Thanks.

  reply	other threads:[~2025-03-25 23:08 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-03-18 23:24 [RFC PATCH v1 0/4] Fix `cargo package` for libgit-sys Josh Steadmon
2025-03-18 23:24 ` [RFC PATCH v1 1/4] libgitpub: move to separate contrib/ directory Josh Steadmon
2025-03-18 23:24 ` [RFC PATCH v1 2/4] libgit-sys: add symlink to git repo root and clean after build Josh Steadmon
2025-03-19 22:23   ` Josh Steadmon
2025-03-20 11:10     ` Phillip Wood
2025-03-21 19:49       ` Josh Steadmon
2025-03-18 23:24 ` [RFC PATCH v1 3/4] libgit-sys: parallelize build with Cargo's jobserver Josh Steadmon
2025-03-18 23:24 ` [RFC PATCH v1 4/4] libgit-sys: exclude unnecessary directories in git-src Josh Steadmon
2025-03-21 22:14 ` [PATCH v2 0/5] Fix `cargo package` for libgit-sys Josh Steadmon
2025-03-21 22:14   ` [PATCH v2 1/5] libgitpub: move to separate contrib/ directory Josh Steadmon
2025-03-21 22:14   ` [PATCH v2 2/5] libgit-sys: add symlink to git repo root and build out of tree Josh Steadmon
2025-03-23  1:46     ` Eric Sunshine
2025-03-24 15:42       ` Junio C Hamano
2025-03-25 17:57         ` Josh Steadmon
2025-03-25 23:08           ` Junio C Hamano [this message]
2025-03-27 18:58             ` Josh Steadmon
2025-03-29 10:46               ` Junio C Hamano
2025-03-31 14:52               ` Johannes Schindelin
2025-03-21 22:14   ` [PATCH v2 3/5] libgit-sys: parallelize build with Cargo's jobserver Josh Steadmon
2025-03-21 22:14   ` [PATCH v2 4/5] libgit-sys: exclude unnecessary directories in git-src Josh Steadmon
2025-03-21 22:14   ` [PATCH v2 5/5] libgit-{sys,rs}: add license and description fields Josh Steadmon

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=xmqqy0wslndp.fsf@gitster.g \
    --to=gitster@pobox$(echo .)com \
    --cc=git@vger$(echo .)kernel.org \
    --cc=phillip.wood123@gmail$(echo .)com \
    --cc=sandals@crustytoothpaste$(echo .)net \
    --cc=steadmon@google$(echo .)com \
    --cc=sunshine@sunshineco$(echo .)com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox