commit | 12f985283f30dc9867d0b608f2bbf3007f0898b3 | [log] [tgz] |
---|---|---|
author | bors-servo <lbergstrom+bors@mozilla.com> | Mon May 08 11:52:37 2017 -0500 |
committer | GitHub <noreply@github.com> | Mon May 08 11:52:37 2017 -0500 |
tree | da7d55e40aa4962cb370b4db07d68f84708b170a | |
parent | 3eb8f70ca06a053230bd881a255b4e27a1f61ded [diff] | |
parent | a33fb570dad489e850d9d70b2a5e3d970318bfaa [diff] |
Auto merge of #690 - KyleMayes:clang-sys, r=fitzgen Bump clang-sys to 0.17.0 It turns out that some versions of Clang don't have `#include <...> search starts here:` in their output (KyleMayes/clang-sys#54). I changed the storage type of the include search paths in `clang-sys` from `Vec<PathBuf>` to `Option<Vec<PathBuf>>` to reflect the possibility that finding and parsing the include search paths might fail.
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