commit | ea9a9322053b4bfef91206e33a67cf96e2831930 | [log] [tgz] |
---|---|---|
author | bors-servo <lbergstrom+bors@mozilla.com> | Fri May 19 22:50:51 2017 -0500 |
committer | GitHub <noreply@github.com> | Fri May 19 22:50:51 2017 -0500 |
tree | 63e3fa2d52fedcdeb7bc4c99859af2b9866c52fa | |
parent | 25150ca64f8009ac53829a2daa031c8723684523 [diff] | |
parent | 44f68587e4635df5661e64f03dd2dd4d9a3ebd30 [diff] |
Auto merge of #708 - emilio:template-inst-noise, r=fitzgen codegen: Reuse the next_child_local_id hack for template instantiations. This should be good enough, following the pattern of anonymous items, and should prevent most of the current noise in stylo updates. Closes #620 Fixes #619
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