commit | 8d045d2f20f004bcc813bcf6aa68b170b6aa9c77 | [log] [tgz] |
---|---|---|
author | bors-servo <lbergstrom+bors@mozilla.com> | Mon Oct 30 00:48:42 2017 -0500 |
committer | GitHub <noreply@github.com> | Mon Oct 30 00:48:42 2017 -0500 |
tree | 3aa051346183c079bbb6935c3c2f029f473a20b1 | |
parent | 77046b79e4704407cebc8cf1971571215b7dc911 [diff] | |
parent | 67e98ba7184451ff6e6d6db59c006817b606c4c8 [diff] |
Auto merge of #1123 - photoszzt:fix_mangle_name, r=pepyakin Need mangle name of fields in struct for impl debug Fix #1122 r? @fitzgen or @emilio or @pepyakin
bindgen
impl period
has been started! Join us at Gitter.im.
bindgen
automatically generates Rust FFI bindings to C and 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! 📚
API reference documentation is on docs.rs