tag | e5386b79f9b70beb7d89dcd8048675f40d325b4e | |
---|---|---|
tagger | Emilio Cobos Álvarez <emilio@crisal.io> | Mon Jul 10 10:23:49 2017 +0200 |
object | 78e7546d3be61a7cb7272c7365564300481798ae |
v0.26.3
commit | 78e7546d3be61a7cb7272c7365564300481798ae | [log] [tgz] |
---|---|---|
author | bors-servo <lbergstrom+bors@mozilla.com> | Wed Jul 05 12:12:12 2017 -0700 |
committer | GitHub <noreply@github.com> | Wed Jul 05 12:12:12 2017 -0700 |
tree | 82f6029bb8204b573019071a2a7954c7875826ce | |
parent | 607b5bd5cd0aac4bf2f7ba1d87875c8e9dd71a20 [diff] | |
parent | 1bf0b8a40bbca6ffdfb1cdd116a3f3fa0cdc8f10 [diff] |
Auto merge of #783 - emilio:bump, r=fitzgen Minor version bump to grab clang-sys bump.
bindgen
bindgen
automatically generates Rust FFI bindings to C and C++ libraries.
For example, given the C header cool.h
:
typedef struct CoolStruct { int x; int y; } CoolStruct; void cool_function(int i, char c, CoolStruct* cs);
bindgen
produces Rust FFI code allowing you to call into the cool
library's functions and use its types:
/* automatically generated by rust-bindgen */ #[repr(C)] pub struct CoolStruct { pub x: ::std::os::raw::c_int, pub y: ::std::os::raw::c_int, } extern "C" { pub fn cool_function(i: ::std::os::raw::c_int, c: ::std::os::raw::c_char, cs: *mut CoolStruct); }
📚 Read the bindgen
users guide here! 📚
API reference documentation is on docs.rs