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

considering that https://github.com/rust-lang/rust-bindgen/pull/2851 exist. It might make sense to add a similar workflow for firefox to prevent breaking changes as this has happened in the past cc @emilio

### Input C/C++ Header ```C++ using size_t = decltype(sizeof(0)); namespace std { inline namespace __1 { #ifdef BROKEN using ::size_t; #else using size_t = ::size_t; #endif }} void foo(std::size_t i);...

### Input C/C++ Header ```C++ struct Bytes { char bytes[1024]; }; ``` ### Bindgen Invocation ``` $ bindgen input.h --no-copy Bytes ``` ### Actual Results ```rust /* automatically generated by...

This code: ```C #define CELL_WIDEASIAN_MASK 0x8000000000000000ull #define CELL_NOBACKGROUND_MASK 0x0400000000000000ull ``` results in: ```rust pub const CELL_WIDEASIAN_MASK: i64 = -9223372036854775808; pub const CELL_NOBACKGROUND_MASK: u64 = 288230376151711744; ``` It seems bindgen just...

bug
A-macros

Certain types like std::string or std::vector are quite common in C++ code, yet trying to run them through bindgen tends to be a nightmare because their implementations are actually very...

enhancement
help wanted

As far as I can tell, #1089 was resolved by the ability to add custom derives. The support for more custom attributes beyond just listing derives wasn't part of the...

For reproduction see [here](https://github.com/lightbulb128/bindgen-bug-mw). When `static Foo Foo::create_foo(int x)` is called, throws `signal: 11, SIGSEGV: invalid memory reference`. But when the destructor is removed, it could work. Furthermore I confirm...

Hi, I think I'm going crazy, I have been trying to use an external C library in my Rust program without success. The C library is `uhubctl`, source code is...

I am trying to create a binding to a file that should use header files from GCC. I am passing arguments specifying the paths to the header files using clang_args(),...

This means `unsafe_op_in_unsafe_fn` in edition 2024 complains about the `from_library` function. Example: ```c // file src/foo.h extern int SOME_CONSTANT; ``` ```rust // file src/main.rs #![allow(non_camel_case_types)] #![allow(non_snake_case)] #![allow(non_upper_case_globals)] #![allow(dead_code)] #![allow(clippy::all)] #![allow(rustdoc::broken_intra_doc_links)]...