-
Notifications
You must be signed in to change notification settings - Fork 320
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
Binding generation fails when generic struct is aliased #286
Comments
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:
|
Yes, that seems to work. That'll be a good workaround for now. Thanks! |
Underlying issue: #7 |
PiDelport
added a commit
to ntls-io/rtc-data
that referenced
this issue
Jun 11, 2021
…andling issues Issues: * mozilla/cbindgen#7 * mozilla/cbindgen#286 * mozilla/cbindgen#573
PiDelport
added a commit
to ntls-io/rtc-data
that referenced
this issue
Jun 11, 2021
…andling issues Issues: * mozilla/cbindgen#7 * mozilla/cbindgen#286 * mozilla/cbindgen#573
PiDelport
added a commit
to ntls-io/rtc-data
that referenced
this issue
Jun 15, 2021
…andling issues Issues: * mozilla/cbindgen#7 * mozilla/cbindgen#286 * mozilla/cbindgen#573
jimblandy
added a commit
to jimblandy/wgpu
that referenced
this issue
Apr 3, 2022
The definition of `EglInstance` trips mozilla/cbindgen#286. Since the `wgpu_hal::gles::egl` module is an implementation detail anyway, it should be harmless to ask cbindgen to just ignore it. Fixes gfx-rs#2575.
Closed
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.The text was updated successfully, but these errors were encountered: