commit | 521b7d11b0a814b9533a83e981f7a5d7fac63fbf | [log] [tgz] |
---|---|---|
author | bors-servo <lbergstrom+bors@mozilla.com> | Tue Jun 20 01:26:56 2017 -0700 |
committer | GitHub <noreply@github.com> | Tue Jun 20 01:26:56 2017 -0700 |
tree | 9b814322d5709888127e4d71ef579d5f9410d573 | |
parent | 27e2c108ef25f9a207f7f8b3cf2dff5ea7c4381f [diff] | |
parent | 88ea65696b6850460405357836ea6ab4a12a5f3f [diff] |
Auto merge of #764 - fitzgen:as-named-to-as-template-param, r=emilio Rename `AsNamed` to `AsTemplateParam` And also its trait methods `is_named` and `as_named` into `is_template_param` and `as_template_param` respectively. These new names better reflect what the trait is about. r? @emilio
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