Go to file
Ryan Osial 8afc7634d7 Support str as input to Builder::no_* functions
Previously, only String was supported on these while other
functions in Builder worked with both str and String
2018-01-27 16:20:35 -05:00
.github s/servo/rust-lang-nursery/ \o/ 2017-07-25 16:32:13 -07:00
bindgen-integration Don't generate symbols for pure virtual functions. 2017-12-29 17:18:20 +01:00
book Auto merge of #1052 - ambaxter:bitfield_docs, r=fitzgen 2018-01-17 14:34:24 -06:00
ci quickchecking CI tests 2017-12-05 18:31:56 -08:00
csmith-fuzzing predicate.py: Add an option to not delete temp files 2017-12-08 14:36:52 -08:00
releases Add a changelog 2017-11-01 11:59:51 -07:00
src Support str as input to Builder::no_* functions 2018-01-27 16:20:35 -05:00
tests Bump quote to 0.4 2018-01-23 00:40:19 +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 ci: Fix Travis. 2018-01-04 12:29:21 +01:00
appveyor.yml Setup Appveyor 2017-07-26 19:56:40 +02:00
build.rs Use quote instead of syntex for Rust code generation 2017-09-07 10:52:31 -07:00
Cargo.lock Minor version bump. 2018-01-26 23:05:53 +01:00
Cargo.toml Minor version bump. 2018-01-26 23:05:53 +01:00
CHANGELOG.md Fix year in release date for 0.32.2 2018-01-22 10:45:56 -08:00
CONTRIBUTING.md Address PR change requests 2017-12-08 22:34:52 -08:00
example-graphviz-ir.png Update the example graphviz image 2017-02-17 17:45:49 -08:00
LICENSE fix build and add license 2013-08-05 10:43:15 +08:00
README.md Add links to impl period blog post and gitter.im 2017-09-21 20:04:10 +03:00
rustfmt.toml Remove unstable rustfmt-nightly features 2017-12-04 11:59:18 +01:00

bindgen

impl period has been started! Join us at Gitter.im.

bindgen automatically generates Rust FFI bindings to C and 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!