{"repo":"rust-lang/rust-bindgen","free":true,"listed":false,"github":"https://github.com/rust-lang/rust-bindgen","clone":"git clone https://github.com/rust-lang/rust-bindgen.git","description":"Automatically generates Rust FFI bindings to C (and some C++) libraries.","language":"Rust","stars":5268,"topics":["ffi","bindings","codegen"],"license":"BSD-3-Clause","category":"dev-tools","readme_excerpt":"bindgen bindgen automatically generates Rust FFI bindings to C (and some C++) libraries. For example, given the C header doggo.h : bindgen produces Rust FFI code allowing you to call into the doggo library's functions and use its types: Users Guide 📚 Read the bindgen users guide here! 📚 MSRV The bindgen minimum supported Rust version is 1.71.0 . The bindgen-cli minimum supported Rust version is 1.71.0 . No MSRV bump policy has been established yet, so MSRV may increase in any release. The MSRV is the minimum Rust version that can be used to compile each crate. However, bindgen and bindgen-cli can generate bindings that are compatible with Rust versions below the current MSRV. Most of the time, the bindgen-cli crate will have a more recent MSRV than bindgen as crates such as clap require it. API Reference API reference documentation is on docs.rs Environment Variables In addition to the library API and [executable command-line API][bindgen-cmdline], bindgen can be controlled through environment variables. End-users should set these environment variables to modify bindgen 's behavior without modifying the source code of direct consumers of bindgen . - BINDGEN EXTRA CLANG ARGS : extra arguments to pass to clang - Arguments are whitespace-separated - Use shell-style quoting to pass through whitespace - Examples: - Specify alternate sysroot: --sysroot=/path/to/sysroot - Add include search path with spaces: -I\"/path/with spaces\" - BINDGEN EXTRA CLANG ARGS : similar to BINDGEN EXT","default_branch":null,"files":null,"tree":[],"storefront":"/r/rust-lang","claimed":false,"request_supported":{"post":"https://gitbuyer.com/r/rust-lang/rust-bindgen/request-supported","requests":0},"note":"indexed from public GitHub; nothing is for sale on this page. Clone it from GitHub. Paid listings live at /search."}