rust-bindgen icon indicating copy to clipboard operation
rust-bindgen copied to clipboard

Automatically generates Rust FFI bindings to C (and some C++) libraries.

Results 460 rust-bindgen issues
Sort by recently updated
recently updated
newest added

Partially fixes https://github.com/rust-lang/rust-bindgen/issues/2094

Here is a diff of regenerating some bindings with servo/rust-bindgen over the old Yamakaky/rust-bindgen: https://github.com/jeremyletang/rust-sfml/commit/ed4ecd7d48d756bf2d51d85f928c3c736c780625#diff-1e7d161ae38b44ab3fb4c32f7c2bdf19R371 It adds a lot of extra noise with all those extern blocks.

enhancement

### Input C/C++ Header ```C++ #include typedef u16 uint16_t; extern void meow(u16 a); ``` ### Bindgen Invocation ```Rust bindgen::builder() .header("bindgen.h") .generate() .unwrap() ``` ### Actual Results ```rust /* snip */...

enhancement
A-enums

the default ABI of the windows kernel is stdcall, so the most functions do not specify ABI. Is it possible to increase the default ABI option? example `default_abi(name: &str)` ```rust...

Fix #2683. Fairly hacky fix right now, but it doesn't seem to break any tests.

Use `TryInto` instead of `as` casts.

### Input C/C++ Header https://github.com/cloudflare/boring/blob/2ab71411c19ef6136174152c605cf3511fbbb336/boring-sys/build/main.rs#L688-L718 ### Bindgen Invocation https://github.com/cloudflare/boring/blob/2ab71411c19ef6136174152c605cf3511fbbb336/boring-sys/build/main.rs#L648-L671 and ``` cargo build --target aarch64-unknown-linux-gnu ``` ### Actual Results ``` thread 'main' panicked at 'assertion failed: `(left == right)` left:...

### Input C/C++ Header it's entirely composed of #include statements ### Bindgen Invocation ```Rust let bindings = bindgen::Builder::default() .header("cpp/bindings.h") .clang_args([ "-x", "c++", "-Icpp/public", "-Icpp/public/tier0", "-Icpp/public/tier1", "-Icpp/public/bitmap", "-Wno-inconsistent-missing-override", "-D", "GNUC=1", "-D",...

Bindgen version `0.69.4` infers name for anonymous enumeration from its typedef, even if the typedef and enumerations are different. ### Input C/C++ Header ```C++ typedef enum { A, B }...