cbindgen icon indicating copy to clipboard operation
cbindgen copied to clipboard

Feature/cfg_attr

Open boozook opened this issue 7 years ago • 0 comments

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.

boozook avatar Aug 09 '18 16:08 boozook