tag | 25453c6d7f03847ec05aa1feac5bb2cf33cd4e51 | |
---|---|---|
tagger | Emilio Cobos Álvarez <emilio@crisal.io> | Sat May 27 18:20:06 2017 +0200 |
object | daf1935534de9cd09a8d3f4384af20eaa4fe0f01 |
v0.25.3
commit | daf1935534de9cd09a8d3f4384af20eaa4fe0f01 | [log] [tgz] |
---|---|---|
author | bors-servo <lbergstrom+bors@mozilla.com> | Sat May 27 07:44:45 2017 -0500 |
committer | GitHub <noreply@github.com> | Sat May 27 07:44:45 2017 -0500 |
tree | c461e6bc1eddcc2be708181d831a8e55a5bffda7 | |
parent | 3798bc7c15204af16e860eca7597b513bf1828e1 [diff] | |
parent | 7abf3756225070f72fe4dd7ab7dc9f414c616942 [diff] |
Auto merge of #724 - emilio:mangling-panic, r=upsuper Minor version 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