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

add BindgenOptions::require_syn method #2265

Merged
merged 2 commits into from Sep 10, 2022

Conversation

pvdrz
Copy link
Contributor

@pvdrz pvdrz commented Sep 6, 2022

This PR adds the BindgenOptions::require_syn method that can be used to know if we need to parse the generated items with syn to do any code manipulation, like sorting semantically.

It also reorganizes the logic inside Bindings::generate so we can easily add different passes of code manipulation in the future.

Copy link
Member

@amanjeev amanjeev left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I approve this but obviously we will wait for @emilio hehe

CONTRIBUTING.md Show resolved Hide resolved
Copy link
Member

@kulp kulp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This seems reasonable to me.

@kulp
Copy link
Member

kulp commented Sep 10, 2022

Since we talked about syn before in #2251 and #2254, there seems to be little reason not to go this way.

@kulp kulp merged commit 8b29355 into rust-lang:master Sep 10, 2022
@pvdrz pvdrz deleted the options-require-syn branch September 10, 2022 01:24
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.

None yet

3 participants