commit | f661f58188c6442145ff8856b059ce3e09941e5e | [log] [tgz] |
---|---|---|
author | bors-servo <lbergstrom+bors@mozilla.com> | Fri Oct 27 13:10:59 2017 -0500 |
committer | GitHub <noreply@github.com> | Fri Oct 27 13:10:59 2017 -0500 |
tree | f542f16958998424a6d0a811327bce651ac3cfee | |
parent | a08d8fd65f2099ad8a97f796eab0f8ce8fc0a6c2 [diff] | |
parent | 849c41de2a2f356555a83ec051794246bc985434 [diff] |
Auto merge of #1109 - fitzgen:rustfmt-stdout, r=fitzgen lib: rustfmt output to stdout *(Recreated + slightly touched up version of #1042 + a version bump)* Simplify the rustfmt and write mechanism. Use rustfmt generated string to allow writing to stdout or to rustfmt a file.
bindgen
impl period
has been started! Join us at Gitter.im.
bindgen
automatically generates Rust FFI bindings to C and 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