Registry / build-tool / libbindgen

libbindgen

JSON →
libraryrscratesunverified

A binding generator for Rust, used to create FFI bindings from C/C++ headers.

# Cargo.toml [dependencies] libbindgen = "latest"
INSTALL
IMPORT
SIG · LIBBINDGEN
L
libbindgen
build-toolrust
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Builder
use bindgen::Builder;

Generate Rust FFI bindings from a C header file.

use bindgen::Builder; fn main() { let bindings = Builder::default() .header("wrapper.h") .generate() .unwrap(); bindings.write_to_file("bindings.rs").unwrap(); }
Debug
Known issues
gotchaRequires clang/LLVM to be installed on the system.
fix
Install LLVM/clang via your package manager or from https://llvm.org.
affects: >=0.1.0
Upgrade
Version history

Breaking-change detection hasn't run for this library yet.

Audit
Dependencies

No dependency data recorded yet.

Agent activity
16 hits · last 30 days
node
12
OpenAI (training)
1
Resources
libbindgen — cargo add libbindgen · libregistry