commit | b10fa6f894c1314dd06cd0720e95b4e4a8d3117f | [log] [tgz] |
---|---|---|
author | Nathan Froyd <froydnj@gmail.com> | Mon May 18 15:32:14 2020 -0400 |
committer | Emilio Cobos Álvarez <emilio@crisal.io> | Mon May 18 22:21:48 2020 +0200 |
tree | 92b4c169e39c551f92c8186dc82504a170b29c01 | |
parent | b1a1ebc918e44f4aa928878dae20fa7be6c87043 [diff] |
add command-line option for disabling untagged unions One more thing that we can configure from the command line.
bindgen
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! 📚
The minimum supported Rust version is 1.34.
No MSRV bump policy has been established yet, so MSRV may increase in any release.
API reference documentation is on docs.rs