commit | c77f8c7975515aaafb680198d158ce03ca605b25 | [log] [tgz] |
---|---|---|
author | bors-servo <lbergstrom+bors@mozilla.com> | Sun Sep 30 05:58:41 2018 -0400 |
committer | GitHub <noreply@github.com> | Sun Sep 30 05:58:41 2018 -0400 |
tree | a13e705668b9ee165a11f4ed9b458a5e359000e4 | |
parent | c6f9fe0e03d04c9b6d5d57c319a7b91962885361 [diff] | |
parent | 1c7f8c61e959426f2a79ef1d73c5034ae923812f [diff] |
Auto merge of #1404 - auscompgeek:fix-args-are-cpp, r=emilio Fix args_are_cpp to look for -x without = Clang doesn't allow `=` between `-x` and the language name.
bindgen
impl period
has been started! Join us at Gitter.im.
bindgen
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! 📚
API reference documentation is on docs.rs