Skip to content

Conversation

@danielocfb
Copy link
Collaborator

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.

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 <deso@posteo.net>
@danielocfb danielocfb merged commit c7e65c8 into libbpf:master Sep 5, 2025
11 checks passed
@danielocfb danielocfb deleted the topic/bindgen-version branch September 5, 2025 16:20
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants