rust-bindgen
rust-bindgen copied to clipboard
Automatically generates Rust FFI bindings to C (and some C++) libraries.
Hello, I have `bindgen.derive_default(true)`, but `rustified_enum` types don't have a default impl. Can we either: - Derive default if there is a variant that equals to 0 - Derive default...
Occasionally, conflicts between header files necessitate running Bindgen separately on each and then merging the resulting bindings. Present bindgen_ty_{number} identifiers generated for unnamed enums cause naming conflicts. This PR introduces...
# Problem The goal is to have c headers be the source of truth and then have bindgen generate function signatures that can be implemented by rust code. the following...
### Input C Header ```c #define MACRO_ARRAY {1, 2} static const int static_const_array[] = {3, 4}; ``` ### Bindgen Invocation ``` $ bindgen input.h ``` ### Actual Results ```rust extern...
TODOs: - [ ] check enum width as suggested by @emilio in this [comment](https://github.com/rust-lang/rust-bindgen/issues/3263#issuecomment-3170854235) - [ ] should there be a `--rustified-non-exhaustive-repr-c-enum` flag? - [x] Update CHANGELOG.md Closes #3263.
- add a generate_hidden_functions option so bindgen can keep functions that Clang marks with hidden/protected visibility (fixes https://github.com/rust-lang/rust-bindgen/issues/2989) - allow Function::parse to honor the new option instead of dropping those...
Constant generation for my project got broken by PR #3288. I can't copy-paste a repro directly because of closed source blah blah blah, will try to get a minimal repro...
I think the code part for this is in here: https://github.com/rust-lang/rust-bindgen/blob/50ec3ee0d9436ff0d6e50c5ff59bf05ef137b386/bindgen/codegen/dyngen.rs#L176 where would it be possible to just have like `.dynamic_no_methods(true)`
bindgen version and cargo build output: ```shell PS C:\Users\admin\Desktop\rust_test\bindgen_bug> cargo build Compiling bindgen_bug v0.1.0 (C:\Users\admin\Desktop\rust_test\bindgen_bug) warning: unused import: `bugtest::*` --> src\main.rs:2:5 | 2 | use bugtest::*; | ^^^^^^^^^^ | =...
If I go to https://github.com/rust-lang/rust-bindgen/tree/v0.72.0 then I see this message: >This commit does not belong to any branch on this repository, and may belong to a fork outside of the...