esp-idf-sys icon indicating copy to clipboard operation
esp-idf-sys copied to clipboard

Add new bindgen options to generate wrappers for inline functions

Open gopakumarce opened this issue 2 years ago • 2 comments

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 https://github.com/rust-lang/rust-bindgen/discussions/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 avatar May 21 '23 18:05 gopakumarce

@ivmarkov this is for https://github.com/esp-rs/esp-idf-sys/issues/201#issuecomment-1553982530

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

gopakumarce avatar May 21 '23 18:05 gopakumarce

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

gopakumarce avatar May 22 '23 22:05 gopakumarce