commit | e7978c51e1bd82a54281d5a6be654f1ded9dd626 | [log] [tgz] |
---|---|---|
author | Emilio Cobos Álvarez <emilio@crisal.io> | Sat May 20 10:54:40 2017 +0200 |
committer | Emilio Cobos Álvarez <emilio@crisal.io> | Sat May 20 10:54:40 2017 +0200 |
tree | dca1ec80fcb154249a0533c84ad75d7e1802bd48 | |
parent | ea9a9322053b4bfef91206e33a67cf96e2831930 [diff] |
Minor version bump to peek up clang-sys updates in stylo. This should fix https://bugzilla.mozilla.org/show_bug.cgi?id=1365488
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