All of lore.kernel.org
 help / color / mirror / Atom feed
From: Junio C Hamano <gitster@pobox.com>
To: Patrick Steinhardt <ps@pks.im>
Cc: git@vger.kernel.org,
	 "brian m. carlson" <sandals@crustytoothpaste.net>,
	Ezekiel Newren <ezekielnewren@gmail.com>
Subject: Re: [PATCH 3/3] rust: generate bindings via cbindgen
Date: Thu, 23 Oct 2025 15:01:32 -0700	[thread overview]
Message-ID: <xmqqbjlxs2f7.fsf@gitster.g> (raw)
In-Reply-To: <20251023-b4-pks-rust-cbindgen-v1-3-c19b61b03127@pks.im> (Patrick Steinhardt's message of "Thu, 23 Oct 2025 09:17:40 +0200")

Patrick Steinhardt <ps@pks.im> writes:

> An initial version instead included the bindings in "varint.h". But that
> would cause us to recompile all dependents of "varint.h" every time the
> signatures of exported Rust functions change. So instead, we now include
> it in "varint.c" and compile that file unconditionally again.
>
> Adapt our CI to install cbindgen(1) accordingly.
>
> Signed-off-by: Patrick Steinhardt <ps@pks.im>
> ---

I am debating myself if we want a patch like this.  I tend to prefer
"make clean" not to be too specific to the build options used to
leave crufts.


 Makefile | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)

diff --git i/Makefile w/Makefile
index 59e5a2c61c..9b673865e5 100644
--- i/Makefile
+++ w/Makefile
@@ -1558,12 +1558,13 @@ endif
 ALL_CFLAGS = $(DEVELOPER_CFLAGS) $(CPPFLAGS) $(CFLAGS) $(CFLAGS_APPEND)
 ALL_LDFLAGS = $(LDFLAGS) $(LDFLAGS_APPEND)
 
+# allow "make WITH_RUST=Yes && make clean" to discard it
+C_BINDINGS = c-bindings.h
+
 ifdef WITH_RUST
 BASIC_CFLAGS += -DWITH_RUST
 GITLIBS += $(RUST_LIB)
 
-C_BINDINGS = c-bindings.h
-
 GENERATED_H += $(C_BINDINGS)
 
 $(C_BINDINGS): cbindgen.toml $(RUST_SOURCES)

  parent reply	other threads:[~2025-10-23 22:01 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 [this message]
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

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=xmqqbjlxs2f7.fsf@gitster.g \
    --to=gitster@pobox.com \
    --cc=ezekielnewren@gmail.com \
    --cc=git@vger.kernel.org \
    --cc=ps@pks.im \
    --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 an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.