rust-lang/rust-bindgen

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

View on GitHub ↗Jump to charts ↓Open shareable report

Summary Information

Updated 32 minutes ago
Added to GitGenius on September 12th, 2026
Created on June 22nd, 2016
Open Issues & Pull Requests: 594 (+0)
GitHub issues: Enabled
Number of forks: 829
Total Stargazers: 5,280 (+0)
Total Subscribers: 50 (+0)

Repository Insights (GitGenius)

Median issue/PR response: 13.7 hours
Mean response time: 38.8 days
90th percentile: 68.1 days
Tracked items: 251

Most active contributors

Sign in to see contributor activity.

How this project is maintained

Around half of the issues opened in the past year never receive a reply. 97% of open issues come from outside the core team, so the backlog reflects real-world use rather than internal planning. 34% of tracked open issues have had no activity in three months. Only 3% of issues opened in the past year have been closed. Three people close 70% of everything that gets resolved.

Charts & Analytics

Fetching additional details & charts...

Issue Activity (beta)

Open issues: 189
New in 7 days: 20
Closed in 7 days: 7
Avg open age: 708 days
Stale 30+ days: 152
Stale 90+ days: 124

Recent activity

Opened in 7 days: 18
Closed in 7 days: 6
Comments in 7 days: 1
Events in 7 days: 12

Top labels

  • bug (25)
  • help wanted (21)
  • enhancement (15)
  • rust-for-linux (15)
  • A-bitfields (5)
  • A-macros (5)
  • I-bogus-codegen (4)
  • A-C++ (3)

Detailed Description

rust-bindgen is a code generator that automatically produces Rust FFI bindings to C and some C++ libraries.

The tool solves the problem of manually writing Rust foreign function interface code to call C and C++ libraries. It works by parsing C header files using libclang and generating corresponding Rust FFI declarations, allowing developers to invoke C library functions and use C types directly from Rust without hand-writing the bindings layer.

Developers should choose rust-bindgen when integrating existing C or C++ libraries into Rust projects and want to avoid the error-prone work of manually transcribing type definitions and function signatures. It suits any project that depends on C libraries and needs to maintain those bindings as the underlying C code evolves. The tool provides both a library API for programmatic use and a command-line interface, and supports customization through environment variables to handle cross-compilation scenarios and non-standard library locations.

The project maintains a minimum supported Rust version of 1.71.0 for the library, though the command-line tool may require a newer version due to its dependencies. The project does not follow a fixed release schedule and requests for releases are handled on demand. Development activity shows responsiveness to user needs through environment variable configuration options that address real-world cross-compilation challenges, including per-target clang argument support. The tool's design acknowledges that generated bindings can remain compatible with older Rust versions even when the generator itself requires a newer compiler.