Mikko Lehtonen f8b7761ba3 objc: Handle template params
The objetive-c template type params were handled as Typedefs so every
interface generated its own, clashing in the namespace. This now maps them to id.
2017-05-03 00:54:14 +03:00
2017-05-01 13:04:42 -07:00
2017-04-26 18:05:24 -04:00
2017-04-26 18:05:24 -04:00
2017-05-03 00:54:14 +03:00
2017-05-03 00:54:14 +03:00
2017-04-26 18:05:24 -04:00
2017-05-01 22:10:19 +02:00
2013-08-05 10:43:15 +08:00
2017-04-26 18:05:24 -04:00

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!

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