Emilio Cobos Álvarez 8473e70ede integration: Fix integration tests with rust 1.33.
Alignment arrays are not needed anymore, since we have repr(align).
2019-03-04 03:54:18 +01:00
2019-02-05 07:46:48 +01:00
2018-09-08 02:29:38 +02:00
2017-11-01 11:59:51 -07:00
2019-01-25 12:03:22 -05:00
2019-03-04 03:53:51 +01:00
2019-03-04 03:53:51 +01:00
2018-11-24 19:46:35 +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!

S
Description
一个自动生成 C 和 C++ 库 Rust 绑定的工具。 | A tool that automatically generates Rust bindings for C and C++ libraries.
Readme BSD-3-Clause 30 MiB
Languages
Rust 97.8%
Python 1.4%
Shell 0.5%
C 0.2%
Batchfile 0.1%