From: Eric Sunshine Date: Wed, 17 Sep 2025 09:08:54 GMT Subject: Re: [PATCH v2 14/18] build-helper: cbindgen, let crates generate a header file Message-ID: In-Reply-To: On Tue, Sep 16, 2025 at 9:18 PM Ezekiel Newren via GitGitGadget wrote: > build-helper: cbindgen, let crates generate a header file > > Signed-off-by: Ezekiel Newren > --- It would be nice to have a bit more explanation of what this patch is doing and why. I presume that this is adding boilerplate functionality but that there are no clients of this functionality yet. Is that correct? > diff --git a/rust/cbindgen-template.toml b/rust/cbindgen-template.toml > @@ -0,0 +1,16 @@ > +## compat/posix.h includes stdbool.h where git-compat-util.h does not > +## this is mandatory for correct bool C <-> Rust interop. Though the > +## 'includes' (and all other variables in this file) can be > +## overridden in build.rs. There seems to be some missing punctuation in the above comment, and the final sentence seems to be incomplete, both of which make it difficult to understand what is being said. > +sys_includes = ["compat/posix.h"] > + > +autogen_warning = "/* Warning, this file is autogenerated by cbindgen. Don't modify this manually. */" > + > +language = "C" > +no_includes = true > +usize_is_size_t = true > +style = "tag" > +tab_width = 4 It's a minor thing and probably not super important but I'm wondering if it would be a good idea to follow project guidelines and make the TAB width 8 rather than 4. Doing so might be appreciated by people reading the generated header files.