• Home
  • History
  • Annotate
Name Date Size #Lines LOC

..01-Sep-2019-

src/H01-Sep-2019-25,64318,425

.cargo-checksum.jsonH A D01-Sep-20194.8 KiB11

Cargo.tomlH A D01-Sep-20192.3 KiB9678

LICENSEH A D01-Sep-20191.4 KiB2924

README.mdH A D01-Sep-20191.1 KiB4630

build.rsH A D01-Sep-20192 KiB7461

README.md

1# `bindgen`
2
3[`impl period`](https://blog.rust-lang.org/2017/09/18/impl-future-for-rust.html) has been started! Join us at [Gitter.im](https://gitter.im/rust-impl-period/WG-dev-tools-bindgen).
4
5**`bindgen` automatically generates Rust FFI bindings to C (and some C++) libraries.**
6
7For example, given the C header `doggo.h`:
8
9```c
10typedef struct Doggo {
11    int many;
12    char wow;
13} Doggo;
14
15void eleven_out_of_ten_majestic_af(Doggo* pupper);
16```
17
18`bindgen` produces Rust FFI code allowing you to call into the `doggo` library's
19functions and use its types:
20
21```rust
22/* automatically generated by rust-bindgen */
23
24#[repr(C)]
25pub struct Doggo {
26    pub many: ::std::os::raw::c_int,
27    pub wow: ::std::os::raw::c_char,
28}
29
30extern "C" {
31    pub fn eleven_out_of_ten_majestic_af(pupper: *mut Doggo);
32}
33```
34
35## Users Guide
36
37[�� Read the `bindgen` users guide here! ��](https://rust-lang-nursery.github.io/rust-bindgen)
38
39## API Reference
40
41[API reference documentation is on docs.rs](https://docs.rs/bindgen)
42
43## Contributing
44
45[See `CONTRIBUTING.md` for hacking on `bindgen`!](./CONTRIBUTING.md)
46