commit | 3f1ce7680e893c87a80c57f069acb988fa6fa1e1 | [log] [tgz] |
---|---|---|
author | Emilio Cobos Álvarez <emilio@crisal.io> | Mon Sep 23 17:54:37 2019 +0200 |
committer | Emilio Cobos Álvarez <emilio@crisal.io> | Mon Sep 23 18:53:18 2019 +0200 |
tree | d09175cbf8aa94a2240bd693c45395044a110b69 | |
parent | d7898170fb8feadcab1940c2ecfbac2510780552 [diff] |
ir: Make Ord and PartialOrd implementations agree. See https://github.com/rust-lang/rust/issues/64710. Bogus implementations were introduced in 230545e7c, d3e39dc62, and 379bb1663.
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