commit | a08d8fd65f2099ad8a97f796eab0f8ce8fc0a6c2 | [log] [tgz] |
---|---|---|
author | bors-servo <lbergstrom+bors@mozilla.com> | Fri Oct 27 03:44:40 2017 -0500 |
committer | GitHub <noreply@github.com> | Fri Oct 27 03:44:40 2017 -0500 |
tree | 265d34f66c4cadf687f513bad6c8b9e332cd386e | |
parent | f315d2c99e9566401193c125ac71bc8cf56443f6 [diff] | |
parent | a373b42cdce239c40593683105d1be2feecf9c85 [diff] |
Auto merge of #1108 - hallfox:no-copy-name-patch, r=emilio give better variable name Fixing up a comment from #1105
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