tag | e55072dad17453649b866e01ec7789b08a3777ad | |
---|---|---|
tagger | Emilio Cobos Álvarez <emilio@crisal.io> | Sun Jul 01 15:59:56 2018 +0200 |
object | c197acf847c4ea6012061c1246668514059c34ae |
v0.37.4 Avoid warnings.
commit | c197acf847c4ea6012061c1246668514059c34ae | [log] [tgz] |
---|---|---|
author | bors-servo <lbergstrom+bors@mozilla.com> | Sun Jul 01 09:03:55 2018 -0400 |
committer | GitHub <noreply@github.com> | Sun Jul 01 09:03:55 2018 -0400 |
tree | 2152322c9e415ec7e3ee6efd672be990d489b406 | |
parent | a899ce711617fd7be482622a908a40d5fd1c7628 [diff] | |
parent | 06203c4c956c789fb52dbf9a7f291e5cdad41173 [diff] |
Auto merge of #1343 - emilio:fixup, r=upsuper codegen: Allow unused_mut to prevent warnings on little-endian machines. And fixup whitespace. This is a followup #1342.
bindgen
impl period
has been started! Join us at Gitter.im.
bindgen
automatically generates Rust FFI bindings to C (and some C++) libraries.
For example, given the C header doggo.h
:
typedef struct Doggo { int many; char wow; } Doggo; void eleven_out_of_ten_majestic_af(Doggo* pupper);
bindgen
produces Rust FFI code allowing you to call into the doggo
library's functions and use its types:
/* automatically generated by rust-bindgen */ #[repr(C)] pub struct Doggo { pub many: ::std::os::raw::c_int, pub wow: ::std::os::raw::c_char, } extern "C" { pub fn eleven_out_of_ten_majestic_af(pupper: *mut Doggo); }
📚 Read the bindgen
users guide here! 📚
API reference documentation is on docs.rs