tag | 12452cdbeb3f8ce66839be6a26dcde5f4c02ce83 | |
---|---|---|
tagger | Emilio Cobos Álvarez <emilio@crisal.io> | Wed Jun 21 01:12:27 2017 +0200 |
object | 49526069a0cb9486cb4838134259589addafff40 |
v0.26.1
commit | 49526069a0cb9486cb4838134259589addafff40 | [log] [tgz] |
---|---|---|
author | bors-servo <lbergstrom+bors@mozilla.com> | Tue Jun 20 14:14:52 2017 -0700 |
committer | GitHub <noreply@github.com> | Tue Jun 20 14:14:52 2017 -0700 |
tree | 0b4783bfdcdb734a1c110837d442d6d3ec4f5db3 | |
parent | a99bbd865e813143a81d29fac8cb46acd5bf6141 [diff] | |
parent | 30dc9daa7addb26ff127b3c6a368bdb7ebdc680a [diff] |
Auto merge of #772 - emilio:ff, r=fitzgen codegen: Inline {read,write}_unaligned in order to support rust 1.15.
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