| commit | 3b103b65afcf4e4f1ad09b405a5241dac40572c8 | [log] [tgz] |
|---|---|---|
| author | Emilio Cobos Álvarez <[email protected]> | Fri May 15 18:27:58 2020 |
| committer | Emilio Cobos Álvarez <[email protected]> | Sat May 16 16:08:49 2020 |
| tree | 0b9a970e4dca3265cf13e89d58301f2bdf74beca | |
| parent | b1a1ebc918e44f4aa928878dae20fa7be6c87043 [diff] |
Recurse through type references to find argument names in some cases. This fixes the names in function-typedef-stdcall.h We still keep the fallback introduced in the previous patch because the objective-c test that it fixed is not fixed by this (the cursors aren't even there).
bindgenbindgen automatically generates Rust FFI bindings to C (and some C++) libraries.
For example, given the C header doggo.h:
typedef struct Doggo { int many; char wow; } Doggo; void eleven_out_of_ten_majestic_af(Doggo* pupper);
bindgen produces Rust FFI code allowing you to call into the doggo library's functions and use its types:
/* automatically generated by rust-bindgen */ #[repr(C)] pub struct Doggo { pub many: ::std::os::raw::c_int, pub wow: ::std::os::raw::c_char, } extern "C" { pub fn eleven_out_of_ten_majestic_af(pupper: *mut Doggo); }
📚 Read the bindgen users guide here! 📚
The minimum supported Rust version is 1.34.
No MSRV bump policy has been established yet, so MSRV may increase in any release.
API reference documentation is on docs.rs