rust-bindgen
rust-bindgen copied to clipboard
Automatically generates Rust FFI bindings to C (and some C++) libraries.
While working on updating the rust-bindgen package in debian sid, I ran into a bindgen layout error with leptonica-sys. After some experimentation this failure seems to be caused by building...
Hi, I'm working on upgrading rust-bindgen used in the crate [nrf-softdevice](https://github.com/embassy-rs/nrf-softdevice/tree/master) from 0.55.1 but I've hit a bit of a snag and i'm not sure what to do. I've recreated...
I am trying to generate bindings for a C enum, and make the resulting Rust type *not* derive `Copy`, `Clone`, `Hash`, `PartialEq`, `Eq`: ```c /* netlink.h */ #ifndef _SINF_NETLINK_H #define...
hello, I'm learning Rust from Java, I'm interested in Rust, and recently I had a difficulty compiling to wasm using Rust+ffmpeg hybrid, bindgen couldn't generate the ffi function I needed....
The [unsafe_op_in_unsafe_fn](https://doc.rust-lang.org/nightly/rustc/lints/listing/allowed-by-default.html#unsafe-op-in-unsafe-fn) lint now warns by default. This warning detects calls to unsafe operations in unsafe functions without an explicit unsafe block. ```text warning[E0133]: dereference of raw pointer is unsafe...
Reproduction: * Mac OS 15.3.1, with the headers that come from xcode in `/Applications/Xcode.app/Contents/Developer/Platforms/MacOSX.platform/Developer/SDKs/MacOSX.sdk` * Input C++: ```cpp #include ``` * Command line: `cargo run -- test.hpp --no-layout-tests --enable-cxx-namespaces --...
(Apologies if this already reported in some form: GitHub search shows a lot of semi-related open issues but none seem to define exactly this scenario - even if they may...
This uses an existing callback to allow overriding of constructor name. Part of https://github.com/google/autocxx/issues/124, though only necessary if we also do https://github.com/google/autocxx/pull/1456.
Provide an option to add a line to every mod generated by bindgen. Part of https://github.com/google/autocxx/issues/124, though this is only in fact necessary if we make the changes given in...
Calling option `wrap-static-fns` with `-x c++` to force C++ mode (this also happens when simply calling bindgen on a .hpp file) (https://rust-lang.github.io/rust-bindgen/cpp.html) fails to create `extern.cpp`. Considering this simple `test.h`...