Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Switch from attributes to callbacks. #12

Merged
merged 1 commit into from
Feb 14, 2025

Conversation

adetaylor
Copy link
Owner

This is a major change to autocxx-bindgen which aims to improve maintainability by reducing divergence from upstream bindgen. Specifically, it:

  • Significantly reduces the textual diffence
  • Makes the remaining changes less invasive, such that merge conflicts should be easier to resolve
  • Redoes the changes such that they're more attuned to the current evolution of upstream bindgen, so it may be possible to upstream some or ideally all of these changes. (The ultimate goal is to unfork bindgen!)

See google/autocxx#124 and rust-lang#2943 for the background here.

Specifically this change:

  • Removes the #[bindgen_semantic_attributes] which were added to all sorts of items. Instead,
  • Much more is communicated via the existing ParseCallbacks mechansim.
  • In some cases, it's still necessary to annotate individual types - in this case we generate a newtype wrapper instead of attributes.

This commit also re-enables the bindgen test suite. It does not yet add tests for all the above new functionality; that's yet to come.

This is a major change to autocxx-bindgen which aims to improve maintainability
by reducing divergence from upstream bindgen. Specifically, it:

* Significantly reduces the textual diffence
* Makes the remaining changes less invasive, such that merge conflicts should
  be easier to resolve
* Redoes the changes such that they're more attuned to the current
  evolution of upstream bindgen, so it may be possible to upstream some or
  ideally all of these changes. (The ultimate goal is to unfork bindgen!)

See google/autocxx#124 and
rust-lang#2943 for the background here.

Specifically this change:
* Removes the #[bindgen_semantic_attributes] which were added to all
  sorts of items. Instead,
* Much more is communicated via the existing ParseCallbacks mechansim.
* In some cases, it's still necessary to annotate individual types -
  in this case we generate a newtype wrapper instead of attributes.

This commit also re-enables the bindgen test suite. It does not yet add
tests for all the above new functionality; that's yet to come.
@adetaylor adetaylor merged commit 1964864 into master Feb 14, 2025
4 of 5 checks passed
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.

1 participant