commit | cfd3347c6655195d2a03b11aff9cb5efac327bf9 | [log] [tgz] |
---|---|---|
author | Emilio Cobos Álvarez <emilio@crisal.io> | Tue Mar 10 00:16:05 2020 +0100 |
committer | Emilio Cobos Álvarez <emilio@crisal.io> | Tue Mar 10 00:17:33 2020 +0100 |
tree | aaab9d07972cb2fb154f272ea22835881b96b3f5 | |
parent | 1ecc134fce9308bed29544cca17588dc8ac6a207 [diff] |
Release 0.53.2
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! 📚
API reference documentation is on docs.rs