-
Notifications
You must be signed in to change notification settings - Fork 314
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
Generate headers for re-exports #127
Comments
Even if I have one of these types in the signature of my own exported functions, they aren't exported. |
Sorry for the triple-post, but here's some more information. When running
This is what these types look like: #[no_mangle]
pub enum salty_client_t {} When generating headers in that other crate directly, header definitions for these types are being generated properly. |
Oh, it looks like this isn't the problem of |
Per this, I'm going to close this issue. Feel free to re-open if this is confirmed to be a |
So I'm running into a very similar issue. I have very simple
I try to re-export as suggested previously:
Unfortunately, only the following shows up in the C header:
I would like the following:
How can I achieve this? Am I missing anything? |
@gurchetansingh, I had the same problem. I managed to make it work by:
cbindgen::Builder::new()
.with_parse_deps(true)
.with_parse_include(&["<name of the crate that contains the struct>"])
// ... all other usual stuff
pub use Foo::FooData; |
I have a crate that imports and re-exports
extern "C"
functions andrepr(C)
types from another crate.But the types did not end up in the header file. So I enabled
parse_deps
:Unfortunately that did not help. I assumed it was because I'm not actually using those types. So I explicitly added them to the
export
section:But the header file is still empty (except for the include guard and the std- includes).
How can I include re-exported types in my generated header files?
(For the record, I'm generating the header file with a
build.rs
file.)The text was updated successfully, but these errors were encountered: