commit | 8779c9167f1bb8429f8a13b046be52d5c2654e06 | [log] [tgz] |
---|---|---|
author | Emilio Cobos Álvarez <emilio@crisal.io> | Fri Jun 14 11:14:05 2019 +0200 |
committer | GitHub <noreply@github.com> | Fri Jun 14 11:14:05 2019 +0200 |
tree | 3dc3cf8b91308c293991e0ef39a174fd3754d112 | |
parent | 16614210ba16dc885b2952529990c0a74663a719 [diff] | |
parent | 1c6a179f9201fa08ade314477fd0a0dbf3f16517 [diff] |
Merge pull request #1578 from georgio/patch-1 Update bindgen version
bindgen
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