commit | 3dffd1c50591c4790e2a9f0b1262064854a2e74d | [log] [tgz] |
---|---|---|
author | bors-servo <lbergstrom+bors@mozilla.com> | Thu Dec 14 11:30:29 2017 -0600 |
committer | GitHub <noreply@github.com> | Thu Dec 14 11:30:29 2017 -0600 |
tree | feef3dd99e78298198c4563fd2447ac4c6abf1f3 | |
parent | 84f8e186d7624dcb3df82aa5f98dd8d281194aa7 [diff] | |
parent | 5ca9ac7f6cddf6a5a8fa6ad6bf6b7ed8cfccd75b [diff] |
Auto merge of #1193 - alex:patch-1, r=emilio Fixed rendering of a header in the book
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