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

'pub enum' doesn't exported #33

Closed
RazrFalcon opened this issue Jul 22, 2017 · 8 comments
Closed

'pub enum' doesn't exported #33

RazrFalcon opened this issue Jul 22, 2017 · 8 comments

Comments

@RazrFalcon
Copy link
Contributor

Looks like only "used" enums are exported.

@eqrion
Copy link
Collaborator

eqrion commented Jul 22, 2017

This is by design right now. We filter out all items that aren't used by an extern "C" function. This makes the output headers smaller.

I'd like to make this configurable so that everything can be exported. But I haven't yet.

@hfiguiere
Copy link

hfiguiere commented Sep 25, 2017

actual enums repr(i32) required by export functions are exported as struct (forward) which is both incorrect and not useful.

@eqrion
Copy link
Collaborator

eqrion commented Sep 27, 2017

@hfiguiere That is because cbindgen doesn't recognize repr(i32) for enum's. That is fixed in 9ff9ab1.

@hfiguiere
Copy link

that works. Thanks!

@eqrion eqrion closed this as completed Nov 14, 2017
@elichai
Copy link
Contributor

elichai commented Nov 14, 2018

Is this still true? @eqrion
I have a rust file with just #[repr(C)] enums without any extern "C" functions.
Is there a way to make it work or I must create dumb functions just so it will work on the enums?

@emilio
Copy link
Collaborator

emilio commented Nov 15, 2018

You can use the export.include configuration option.

@elichai
Copy link
Contributor

elichai commented Nov 18, 2018

It worked. Thanks!

@TobiasDeBruijn
Copy link

Is there a way to include all structs/enums, without specifying it manually?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

6 participants