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 new bindgen options to generate wrappers for inline functions #202

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

gopakumarce
Copy link

esp-idf-sys has a ton of utility static inlines which one has to re-implement by hand since bindgen cant do anything with static inlines - till recently. Recent bindgen has an option (still under experimental flag) which creates wrappers for static inlines, see rust-lang/rust-bindgen#2405

This PR adds that ability to esp-idf-sys. I started looking into esp stuff for the very first time few days back, so my understanding of the whole ecosystem is very incomplete, comments welcome on how to do things different/better etc.. I have enabled the same bindgen feature on embuild crate also, which is why the embuild in this PR is pointing to my private github repo for now till that is also merged in

@gopakumarce
Copy link
Author

@ivmarkov this is for #201 (comment)

It works for me, but of course I might not be doing things the right way, pls take a look and comment

@gopakumarce gopakumarce force-pushed the gopa-inline_fns branch 2 times, most recently from 3a666d7 to 34a29e5 Compare May 22, 2023 00:27
esp-idf-sys has a ton of utility static inlines which one has to re-implement by hand since bindgen cant do anything with static inlines - till recently. Recent bindgen has an option (still under experimental flag) which creates wrappers for static inlines, see rust-lang/rust-bindgen#2405

This PR adds that ability to esp-idf-sys. I started looking into esp stuff for the very first time few days back, so my understanding of the whole ecosystem is very incomplete, comments welcome on how to do things different/better etc.. I have enabled the same bindgen feature on embuild crate also, which is why the embuild in this PR is pointing to my private github repo for now till that is also merged in
@gopakumarce
Copy link
Author

The bindgen PR is here https://github.com/esp-rs/embuild/pull/75/files

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

1 participant