Open awelkie opened 5 years ago
So this is because cbindgen isn't able to follow paths, so it gets confused, and your MyStruct in ffi.rs is indeed not generic...
I think you can hack around this, fwiw, with something like:
// ffi.rs
pub use super::MyStruct as MyGenericStruct;
type SomeType = MyGenericStruct<i32>;
Yes, that seems to work. That'll be a good workaround for now. Thanks!
Underlying issue: #7
It looks like this happens when there is a generic struct in one module and a non-generic struct in another module, and you want to generate bindings for that non-generic struct. I have an example project here with these contents:
And I get this error:
It's interesting that if I comment out line 1 of
src/ffi.rs
, then the bug doesn't occur and binding generation happens as I'd expect.