commit | 8c5f862f828b1f85eb29a4159c0f9237ac473fbf | [log] [tgz] |
---|---|---|
author | Nick Fitzgerald <fitzgen@gmail.com> | Wed Feb 14 11:07:28 2018 -0800 |
committer | GitHub <noreply@github.com> | Wed Feb 14 11:07:28 2018 -0800 |
tree | 00a36fc52ad3712baa9af1bb874fc99b43bf8272 | |
parent | a09a8ff66eef3f53340201a79cc09cefacf6163e [diff] | |
parent | 5e49ce9060cda0f20da69af8b5ec81506455a8fc [diff] |
Merge pull request #1255 from sanmai-NL/patch-1 Check for more common C++ header file extensions
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