commit | 705f16a3149a8b2a026c98162b208ad2dee1beaa | [log] [tgz] |
---|---|---|
author | Emilio Cobos Álvarez <emilio@crisal.io> | Wed May 03 21:59:38 2017 +0200 |
committer | Emilio Cobos Álvarez <emilio@crisal.io> | Wed May 03 22:14:03 2017 +0200 |
tree | eaa20086567b001178e63f03b45a4a3b5bde9bb8 | |
parent | 8e9b3884961802a8c5c102ecfff06419e9695199 [diff] |
Breaking 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