v0.25.1
Auto merge of #709 - emilio:fix-stylo-openbsd, r=fitzgen

Minor version bump to peek up clang-sys updates in stylo.

This should fix https://bugzilla.mozilla.org/show_bug.cgi?id=1365488

There aren't any breaking changes since 0.25, only new features and fixes for libclang >3.9
tree: dca1ec80fcb154249a0533c84ad75d7e1802bd48
  1. .github/
  2. bindgen-integration/
  3. book/
  4. ci/
  5. src/
  6. tests/
  7. .gitattributes
  8. .gitignore
  9. .travis.yml
  10. build.rs
  11. Cargo.lock
  12. Cargo.toml
  13. CONTRIBUTING.md
  14. example-graphviz-ir.png
  15. LICENSE
  16. README.md
  17. rustfmt.toml
README.md

bindgen

bindgen automatically generates Rust FFI bindings to C and C++ libraries.

For example, given the C header cool.h:

typedef struct CoolStruct {
    int x;
    int y;
} CoolStruct;

void cool_function(int i, char c, CoolStruct* cs);

bindgen produces Rust FFI code allowing you to call into the cool library's functions and use its types:

/* automatically generated by rust-bindgen */

#[repr(C)]
pub struct CoolStruct {
    pub x: ::std::os::raw::c_int,
    pub y: ::std::os::raw::c_int,
}

extern "C" {
    pub fn cool_function(i: ::std::os::raw::c_int,
                         c: ::std::os::raw::c_char,
                         cs: *mut CoolStruct);
}

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!