git.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Patrick Steinhardt <ps@pks.im>
To: Ezekiel Newren <ezekielnewren@gmail.com>
Cc: git@vger.kernel.org,
	"brian m. carlson" <sandals@crustytoothpaste.net>,
	Junio C Hamano <gitster@pobox.com>
Subject: Re: [PATCH v2 0/5] rust: generate bindings via cbindgen
Date: Thu, 30 Oct 2025 10:50:48 +0100	[thread overview]
Message-ID: <aQM0-IwB3e4t7YKE@pks.im> (raw)
In-Reply-To: <CAH=ZcbAC_u88_cD33bRxAuAPhJh02zNOHAVnkhxthncDFdZOOA@mail.gmail.com>

On Tue, Oct 28, 2025 at 01:37:00PM -0600, Ezekiel Newren wrote:
> On Fri, Oct 24, 2025 at 3:51 AM Patrick Steinhardt <ps@pks.im> wrote:
> >
> > Hi,
> >
> > this small patch series introduces support for cbindgen(1). This tool is
> > used to generate C headers from `extern "C"` blocks so that Rust code
> > can easily be called from C code.
> >
> > For now, the only use case is to verify that our varint reimplementation
> > matches the C implementation. But later on this can and will be used to
> > call Rust-specific features from C, as well.
> >
> > The topic is built on top of c54a18ef67 (The twenty-second batch,
> > 2025-10-22) with ps/ci-rust at e509b5b8be (rust: support for Windows,
> > 2025-10-15) merged into it.
> >
> > Changes in v2:
> >   - Take some of the pieces from Ezekiel's "cbindgen.toml" file. I have
> >     not yet taken `usize_is_size_t`, as that option requires cbindgen
> >     v0.16.0, which is not available on Ubuntu 20.04.
> >   - Backfill missing jobs for GitLab CI.
> >   - Fix CI failures on Alma Linux 8 because cbindgen isn't available
> >     there.
> >   - Link to v1: https://lore.kernel.org/r/20251023-b4-pks-rust-cbindgen-v1-0-c19b61b03127@pks.im
> 
> I really think that this patch series should include migrating to a
> Cargo Workspace. That'll mean moving /Cargo.toml and /src into
> gitcore/ and creating a new top-level /Cargo.toml with the following
> content:
> [workspace]
> members = [
>     "gitcore",
> ]
> resolver = "2"
> 
> Along with the other cascading refactor changes needed to make this
> work. Let's do this now while it's still easy.

I simply think that cbindgen and workspaces are quite unrelated to one
another for now. So an alternate suggestion: once this patch series here
lands we could introduce workspaces in the subsequent patch series. I
think that's still early enough, and this patch series here shouldn't
cause significant additional churn.

In any case, I'd prefer if you wrote that patch series to introduce
workspaces. I don't feel like I have enough experience with them to be
able to argue properly why we want to have them.

Does that work for you?

Thanks!

Patrick

      reply	other threads:[~2025-10-30  9:50 UTC|newest]

Thread overview: 38+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2025-10-23  7:17 [PATCH 0/3] rust: generate bindings via cbindgen Patrick Steinhardt
2025-10-23  7:17 ` [PATCH 1/3] ci: use Debian instead of deprecated i386/ubuntu Patrick Steinhardt
2025-10-23 17:56   ` Junio C Hamano
2025-10-24  6:36     ` Patrick Steinhardt
2025-10-23  7:17 ` [PATCH 2/3] meson: rename Rust library target Patrick Steinhardt
2025-10-23  7:17 ` [PATCH 3/3] rust: generate bindings via cbindgen Patrick Steinhardt
2025-10-23 18:00   ` Ezekiel Newren
2025-10-24  6:37     ` Patrick Steinhardt
2025-10-27 20:35       ` Ezekiel Newren
2025-10-27 21:14         ` brian m. carlson
2025-10-28  4:15           ` Junio C Hamano
2025-10-28 19:11             ` Ezekiel Newren
2025-10-30  9:50               ` Patrick Steinhardt
2025-10-30  9:50             ` Patrick Steinhardt
2025-10-30 21:40               ` brian m. carlson
2025-10-30 21:50                 ` Junio C Hamano
2025-10-30 23:38                   ` brian m. carlson
2025-10-31  6:05                 ` Patrick Steinhardt
2025-10-30  9:50           ` Patrick Steinhardt
2025-10-31 23:36             ` Ezekiel Newren
2025-10-23 21:42   ` Junio C Hamano
2025-10-23 22:01   ` Junio C Hamano
2025-10-23 22:37   ` Junio C Hamano
2025-10-24  6:36     ` Patrick Steinhardt
2025-10-24  9:51 ` [PATCH v2 0/5] " Patrick Steinhardt
2025-10-24  9:51   ` [PATCH v2 1/5] gitlab-ci: reorder Linux job matrix to match GitHub's order Patrick Steinhardt
2025-10-28 19:14     ` Ezekiel Newren
2025-10-24  9:51   ` [PATCH v2 2/5] gitlab-ci: backfill missing Linux jobs Patrick Steinhardt
2025-10-28 19:15     ` Ezekiel Newren
2025-10-24  9:51   ` [PATCH v2 3/5] ci: use Debian instead of deprecated i386/ubuntu Patrick Steinhardt
2025-10-28 19:17     ` Ezekiel Newren
2025-10-30  9:50       ` Patrick Steinhardt
2025-10-24  9:51   ` [PATCH v2 4/5] meson: rename Rust library target Patrick Steinhardt
2025-10-24  9:51   ` [PATCH v2 5/5] rust: generate bindings via cbindgen Patrick Steinhardt
2025-10-24 14:01     ` Toon Claes
2025-10-30  9:51       ` Patrick Steinhardt
2025-10-28 19:37   ` [PATCH v2 0/5] " Ezekiel Newren
2025-10-30  9:50     ` Patrick Steinhardt [this message]

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=aQM0-IwB3e4t7YKE@pks.im \
    --to=ps@pks.im \
    --cc=ezekielnewren@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=gitster@pobox.com \
    --cc=sandals@crustytoothpaste.net \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
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;
as well as URLs for NNTP newsgroup(s).