commit | 3379a90a2d88c7d6333d64fe33ea1bd992904c71 | [log] [tgz] |
---|---|---|
author | Emilio Cobos Álvarez <emilio@crisal.io> | Wed Feb 14 20:45:15 2018 +0100 |
committer | GitHub <noreply@github.com> | Wed Feb 14 20:45:15 2018 +0100 |
tree | aaa7fb15b9216c015afdbb8ae1690ca57535d59c | |
parent | 8c5f862f828b1f85eb29a4159c0f9237ac473fbf [diff] | |
parent | ad6b2231924da983ad818068413c61979bf95ac7 [diff] |
Merge pull request #1256 from fitzgen/fix-missing-dylibs. r=emilio Fix missing dylibs
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