Go to file
Emilio Cobos Álvarez 370a221989 Version bump.
2018-11-30 11:59:50 +01:00
.github Update broken links: Rust-lang-nursery => Rust-lang (#1447) 2018-11-24 15:36:57 +01:00
bindgen-integration Rustfmt the bindgen-integration crate. 2018-11-30 06:22:37 +01:00
book Update bindgen version in tutorial. 2018-10-13 22:08:04 +02:00
ci Update mdbook. 2018-09-08 02:29:38 +02:00
csmith-fuzzing add a description to the new option 2018-06-03 07:10:23 -07:00
releases Add a changelog 2017-11-01 11:59:51 -07:00
src Update which as well. 2018-11-30 06:38:50 +01:00
tests Remove the hack now that rustfmt-nightly properly preserves the comments. 2018-11-30 06:35:28 +01:00
.gitattributes Always check out test headers and expectations as LF 2017-09-22 19:02:42 -07:00
.gitignore Ignore C-Reduce's backup files 2017-10-25 11:14:22 -07:00
.travis.yml Adjust .travis.yml to only use maj-min versions. 2018-04-03 11:27:47 +02:00
appveyor.yml Now that we have stuff that depends on libclang-5 we need to do this. 2018-04-03 11:27:46 +02:00
build.rs Use quote instead of syntex for Rust code generation 2017-09-07 10:52:31 -07:00
Cargo.lock Version bump. 2018-11-30 11:59:50 +01:00
Cargo.toml Version bump. 2018-11-30 11:59:50 +01:00
CHANGELOG.md Bump to version 0.33.1 2018-02-14 10:33:03 -08:00
CONTRIBUTING.md Met @pepyakin in person for the first time last night! Unfortunately they don't have time for bindgen anymore 2018-10-31 11:12:24 +01:00
example-graphviz-ir.png Update the example graphviz image 2017-02-17 17:45:49 -08:00
LICENSE Regenerates the BSD3 License so GitHub recognises it 2018-07-05 14:16:28 +01:00
README.md Update Readme 2018-11-24 19:46:35 +01:00
rustfmt.toml Remove unstable rustfmt-nightly features 2017-12-04 11:59:18 +01:00

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!