-
Notifications
You must be signed in to change notification settings - Fork 20
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
Fix bindings compilation #184
Conversation
ping @mtth-bfft |
It would probably be best for documentation purposes to add a link to the underlying issue (mozilla/cbindgen#326) in the source comment, both for future understanding and so everyone can check if the issue made progress and we can clean up this workaround eventually It's more complex with twice the number of typedefs, but I agree it's better than |
Thanks for the ref, I've added it to the corresponding commit message. |
Benchmark for 1d5032bClick to view benchmark
|
The idiomatic way to test for null arguments is to use
Option<type>
.For now,
bindgen
"forgets" what the inner type is in the following configuration:An opaque
Option_X
will be generated.To avoid this behavior and conserve the actual documentation, this PR:
X
andOption<X>
Option<type alias>
Option
internally, the code uses a Rust FFI guarantee:Option<X>
andX
are represented the same way