rust-bindgen

Automatically generates Rust FFI bindings to C (and some C++) libraries.

Github星跟蹤圖

crates.io
docs.rs

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!

主要指標

概覽
名稱與所有者rust-lang/rust-bindgen
主編程語言Rust
編程語言Rust (語言數: 7)
平台
許可證BSD 3-Clause "New" or "Revised" License
所有者活动
創建於2016-06-22 23:05:51
推送於2025-10-22 05:12:34
最后一次提交
發布數127
最新版本名稱v0.72.1 (發布於 2025-09-01 01:50:28)
第一版名稱0.5 (發布於 )
用户参与
星數5k
關注者數53
派生數768
提交數3.8k
已啟用問題?
問題數1601
打開的問題數484
拉請求數1416
打開的拉請求數50
關閉的拉請求數185
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?