tag | 9464645b37cd49cb5d1fcdae7e32ee4cacca58ac | |
---|---|---|
tagger | Emilio Cobos Álvarez <emilio@crisal.io> | Wed May 03 22:47:42 2017 +0200 |
object | 66b9c3d8698aef0a32147eeabb99264a9b52d171 |
v0.24.0
commit | 66b9c3d8698aef0a32147eeabb99264a9b52d171 | [log] [tgz] |
---|---|---|
author | bors-servo <lbergstrom+bors@mozilla.com> | Wed May 03 15:14:25 2017 -0500 |
committer | GitHub <noreply@github.com> | Wed May 03 15:14:25 2017 -0500 |
tree | 0418b64bb00501347498cab1c69fc587000ebe6c | |
parent | 765671df1a6b93fccf7460043be865055de7ceb2 [diff] | |
parent | 705f16a3149a8b2a026c98162b208ad2dee1beaa [diff] |
Auto merge of #686 - emilio:bump, r=fitzgen Breaking version bump. After all the huge work @fitzgen has been doing diagnosing stylo issues, we seem ready to try again! Also, a lot of issues have been fixed lately.
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