rust-bindgen

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

  • 所有者: rust-lang/rust-bindgen
  • 平台:
  • 許可證: BSD 3-Clause "New" or "Revised" License
  • 分類:
  • 主題:
  • 喜歡:
    0
      比較:

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 15:05:51
推送於2025-06-08 22:54:31
最后一次提交
發布數126
最新版本名稱v0.72.0 (發布於 2025-06-08 13:15:48)
第一版名稱0.5 (發布於 )
用户参与
星數4.8k
關注者數57
派生數750
提交數3.8k
已啟用問題?
問題數1564
打開的問題數474
拉請求數1388
打開的拉請求數52
關閉的拉請求數176
项目设置
已啟用Wiki?
已存檔?
是復刻?
已鎖定?
是鏡像?
是私有?