tag | 012ba4d81aabfe18673b8ac67d943cd7e1e01006 | |
---|---|---|
tagger | Emilio Cobos Álvarez <emilio@crisal.io> | Mon Feb 25 09:44:31 2019 -0800 |
object | 1cd830127489b19a58143c300667d045b447a62d |
v0.47.3
commit | 1cd830127489b19a58143c300667d045b447a62d | [log] [tgz] |
---|---|---|
author | Emilio Cobos Álvarez <emilio@crisal.io> | Mon Feb 25 09:40:34 2019 -0800 |
committer | Emilio Cobos Álvarez <emilio@crisal.io> | Mon Feb 25 09:42:51 2019 -0800 |
tree | f0a20659a556ac4328c0f34d81c9d4a236beef25 | |
parent | f4f47d52cbce45af177958e76ef9a4a17e922bc4 [diff] |
Allow to use which 1.0. It builds fine, and works around backtrace not building in aarch64. https://github.com/alexcrichton/backtrace-rs/issues/160
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