commit | c335215018b9f03c5efc570a8dc67710f72995f3 | [log] [tgz] |
---|---|---|
author | Bastien Orivel <eijebong@bananium.fr> | Thu Aug 15 19:06:51 2019 +0200 |
committer | Emilio Cobos Álvarez <emilio@crisal.io> | Tue Sep 24 20:02:26 2019 +0200 |
tree | b872029bb9f006e4f9853855d2f845eba592ec03 | |
parent | 42de759df5d35ae95a3031c5a82b081355258b5b [diff] |
Revert "Update syn related dependencies and bump version" This reverts commit ac99aa14097aaa7cf09e8f9cf74449d2f84de155.
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