commit | 05b1550f0450cea997dc5dff4083aa4b09d01aae | [log] [tgz] |
---|---|---|
author | Emilio Cobos Álvarez <emilio@crisal.io> | Fri Jul 28 00:57:06 2017 +0200 |
committer | Emilio Cobos Álvarez <emilio@crisal.io> | Fri Jul 28 01:33:07 2017 +0200 |
tree | 2be8fd18c1ed458e99761983f7efc4cd4f1a5c5d | |
parent | c27afeca101957c168ef158e1abc02e4bda33637 [diff] |
Major version bump.
bindgen
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