cbindgen
cbindgen copied to clipboard
Feature/cfg_attr
First implementation #183 , need review. @eqrion
Now supports forms:
#[cfg_attr(feature = "foo", no_mangle)]
#[cfg_attr(feature = "foo", repr(C))]
#[cfg_attr(not(feature = "bar"), repr(C))]
And in the bindgen::utilities::SynItemHelpers::has_attr_word - any word like #[cfg_attr(feature = "foo", any_word)].
Currently ignores first parts of cfg_attr like feature = "xxx" and takes repr, no_mangle or any needed Word-part. But works great for me.