rust-bindgen
rust-bindgen copied to clipboard
Automatically generates Rust FFI bindings to C (and some C++) libraries.
If a type has a flexible array member, any other types which use the type with a flexible array member in their own type does not have the generic for...
When I run bindgen with a packed struct containing a flexible array member I get a compilation error because the FAM uses drop. I can edit the bindgen generated file...
### Intro [SentryPeer](https://github.com/SentryPeer/SentryPeer) is being extended using Rust as a lib. This Rust lib also uses SentryPeer via a C lib it generates, hence the use of `cbindgen` and `bindgen`...
When building [bindings for an embedded OS](https://github.com/thenewwazoo/ChibiOS-rust), updating the dependency from 0.30 to 0.31 causes an error when `Builder::generate` is called. To repro (this assumes you've got arm-none-eabi tools installed):...
I encountered this panic after upgrading macOS SDK. It seems to be related to new C++ headers of the SDK. I'd like to check the related types and adding them...
This prefix disables name mangling in LLVM, but other codegen backends don't support this. We also don't guarantee that it will remain working. As discussed in https://rust-lang.zulipchat.com/#narrow/stream/238009-t-compiler.2Fmeetings/topic/.5Bweekly.5D.202024-09-19/near/471499857 we may choose...
I know you're asking for a minimal header, but I don't have enough C++ experience to be able to understand exactly what's going on. If anyone wants to pair up...
It seems that while bindgen respects preprocessor defines passed through clang for evaluating ifdefs, it does not consider them for processing `#define` directives. While the obvious workaround (or rather perhaps,...
I know we already have `wasm_import_module_name`, but clang already has attributes for that! Supporting them directly would be much more convenient, I think? See: https://clang.llvm.org/docs/AttributeReference.html#import-module Another big motivation for this...
[`std::os::raw`](https://doc.rust-lang.org/std/os/raw/) recommends to use `core::ffi` instead, but for std crates using core directly seem to trigger some warnings. The `std::ffi::*` offers the same types like `c_char` and `c_int` as `core::ffi::*`,...