gecko-dev/third_party/rust/bindgen
Emilio Cobos Álvarez b75eb8afb3 Bug 1552329 - Update bindgen to v0.49.1. r=froydnj
This removes the hasbrown dependency and pulls in Michael's fixes.

Differential Revision: https://phabricator.services.mozilla.com/D31526

--HG--
extra : moz-landing-system : lando
2019-05-16 22:23:59 +00:00
..
src Bug 1552329 - Update bindgen to v0.49.1. r=froydnj 2019-05-16 22:23:59 +00:00
.cargo-checksum.json Bug 1552329 - Update bindgen to v0.49.1. r=froydnj 2019-05-16 22:23:59 +00:00
build.rs Bug 1529681 - Update bindgen. r=bbouvier 2019-03-27 14:39:41 +00:00
Cargo.toml Bug 1552329 - Update bindgen to v0.49.1. r=froydnj 2019-05-16 22:23:59 +00:00
LICENSE Bug 1488172 - Revendor rust dependencies. r=me 2018-09-03 14:13:36 +02:00
README.md Bug 1552329 - Update bindgen to v0.49.1. r=froydnj 2019-05-16 22:23:59 +00:00

crates.io docs.rs

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);
}

Users Guide

📚 Read the bindgen users guide here! 📚

API Reference

API reference documentation is on docs.rs

Contributing

See CONTRIBUTING.md for hacking on bindgen!