Skip to content

Commit c7e65c8

Browse files
d-e-s-odanielocfb
authored andcommitted
Disable bindgen version comment in generated bindings.rs
With us having CI check that the bindgen generated bindings are up-to-date, we can run into issues where we now see a CI failure just because they released a new patch version and now the generated bindings contain a slightly outdated version string in them. E.g.: --- a/src/bindings.rs +++ b/src/bindings.rs @@ -1,4 +1,4 @@ -/* automatically generated by rust-bindgen 0.72.0 */ +/* automatically generated by rust-bindgen 0.72.1 */ This is annoying and a waste of time to tend to. Really the version string in there doesn't add any value: we basically know the major and minor version of bindgen that we used, because we specified it in our Cargo.toml and the patch level really shouldn't have any relevance. So disable the embedding of this version string into the generate bindings altogether. Signed-off-by: Daniel Müller <[email protected]>
1 parent e13d606 commit c7e65c8

File tree

2 files changed

+1
-2
lines changed

2 files changed

+1
-2
lines changed

build.rs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ fn generate_bindings(src_dir: path::PathBuf) {
5959

6060
bindgen::Builder::default()
6161
.rust_target(env!("CARGO_PKG_RUST_VERSION").parse().expect("valid"))
62+
.disable_header_comment()
6263
.derive_default(true)
6364
.explicit_padding(true)
6465
.default_enum_style(bindgen::EnumVariation::Consts)

src/bindings.rs

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,3 @@
1-
/* automatically generated by rust-bindgen 0.72.0 */
2-
31
#[repr(C)]
42
#[derive(Copy, Clone, Debug, Default, Eq, Hash, Ord, PartialEq, PartialOrd)]
53
pub struct __BindgenBitfieldUnit<Storage> {

0 commit comments

Comments
 (0)