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

The following C code declares a prototype of a function taking a variable length array argument: ```c int vla(int w, int xs[][3][w][5]); ``` Currently, it is imported as: ```rust unsafe...

Hi For https://github.com/coreylowman/cudarc there was a need to support multiple versions of cuda C library. Here `cuda 11.4 .. cuda 12.8` for instance. This was done previously by generating a...

I'm building a project integrating `rust-bindgen` and doing `cargo build --target=aarch64-apple-darwin` and still I get this error, where it tries to check for an x86 lib instead of the (existing)...

Per the discussion with @emilio on issue #687, I create this new issue for better tracking. ### Input C/C++ Header I have the following structure definition in C ```C /**...

bug
help wanted
A-bitfields

## Header File Here is an example header, though there are a lot of others which exhibit similar behavior (briefly mentioned in the discussion). ```cpp template struct Inner { T...

Ran into this the issue this evening. ``` thread 'main' panicked at C:\Users\\.cargo\registry\src\index.crates.io-1949cf8c6b5b557f\bindgen-0.59.2\src\ir\ty.rs:1135:22: Not able to resolve vector element?: Continue stack backtrace: 0: 0x7ff7d10ab181 - std::backtrace_rs::backtrace::win64::trace at /rustc/05f9846f893b09a1be1fc8560e33fc3c815cfecb/library\std\src\..\..\backtrace\src\backtrace\win64.rs:85 1: 0x7ff7d10ab181...

This PR adds support for specifying custom field attributes through annotations. Given the following input, ```c struct S { /// int field_1; char field_2; }; ``` the generated bindings will...

While using bindgen against a library with a name such as '-1.0.0', bindgen generates " is not a valid Ident". This seems overly restrictive given that many libraries use such...

pub __bindgen_padding_0: [u8; 40usize], | ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ the trait `Default` is not implemented for `[u8; 40]` This very well may be something I (should) have to work around, but could you...

This PR adds functionality to add custom attributes to function items (proposed in #2978). I've implemented this by extending the `TypeKind` used by `AttributeInfo` to include the `Function(FunctionKind)` variant (see...