macOS
brew install bindgenlocal Homebrew formula metadata
安装
brew install bindgenlocal Homebrew formula metadata
sudo apt install bindgenDebian stable package indexes · bindgen · 来源: deb.debian.org
sudo dnf install bindgen-cliFedora Rawhide package metadata · bindgen-cli · 来源: dl.fedoraproject.org
概览
Automatically generates Rust FFI bindings to C (and some C++) libraries
历史
bindgen is the Rust ecosystem's standard bridge from C and C++ header files to Rust FFI declarations. It uses Clang/libclang to understand native headers, then emits Rust declarations that let crates call C libraries without hand-maintaining large extern blocks.
The bindgen crate was first published to crates.io in November 2014, before the current rust-lang/rust-bindgen GitHub repository was created in June 2016. The project later became a Rust organization project and documents both a library API and a bindgen command-line tool.
The README describes bindgen as automatically generating Rust FFI bindings to C and some C++ libraries, and the user guide documents command-line use, libclang requirements, build-script integration, and allow/block-listing. The changelog and GitHub releases show a continuing 0.x release line, with 0.72.1 published in August 2025.
bindgen became infrastructure rather than just a utility: crates use it from build.rs scripts to follow system headers at build time, while package managers ship the standalone CLI for developers who want generated bindings on demand. The supplied package facts list Homebrew, Debian, Fedora, and Ubuntu packages, and crates.io reports hundreds of millions of crate downloads.
Typical use is to point bindgen at a wrapper header, pass any needed Clang include or target arguments, and either write the generated Rust to a file or integrate generation into a Cargo build script. The README also documents environment variables such as BINDGEN_EXTRA_CLANG_ARGS for end-user control without patching downstream crates.
bindgen matters to package people because it turns native ABI drift into a build-time concern. When a distribution updates libclang, libc headers, OpenSSL, LLVM, or another C dependency, Rust packages that rely on bindgen can regenerate declarations instead of shipping stale vendored bindings.
It is also a classic example of Rust's pragmatic systems story: memory-safe application code still has to meet decades of C APIs, and bindgen is the conveyor belt between those worlds. Its dependency on libclang makes it sensitive to compiler packaging, SDK paths, sysroots, cross-compilation flags, and reproducible-build environments.
安全态势
narrow executable package without higher-risk signals.
绿色 风险 · 低 置信度 · appliance
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
local files
These source-backed paths show where this package keeps local settings or durable credentials. Automic Vault can use them as review targets for secret scanning, migration, and command approval.
Config paths the tool may read or write during local use.
rustfmt.toml in the directory where bindgen is run可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
bindgen | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
https://github.com/rust-lang/rust-bindgen
安装元数据
| 软件包键 | brew:bindgen |
|---|---|
| 版本 | 0.72.1 |
| 软件包管理器 | Homebrew |
| 软件包管理器页面 | https://formulae.brew.sh/formula/bindgen |
| 主页 | https://rust-lang.github.io/rust-bindgen/ |
| 仓库 | https://github.com/rust-lang/rust-bindgen |
| 上游文档 | https://github.com/rust-lang/rust-bindgen#readme |
| 许可证 | BSD-3-Clause |
| 源码归档 | https://github.com/rust-lang/rust-bindgen/archive/refs/tags/v0.72.1.tar.gz |
| 构建依赖 | rust |
| macOS 提供的库 | llvm |
| Bottle | 可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux) |
| Homebrew post-install | 未定义 |
| 服务 | 未声明 |
注册表事实
| Source Database | Homebrew formula API |
|---|---|
| Tap | homebrew/core |
| Full Name | bindgen |
| Version Scheme | 0 |
| Revision | 0 |
| Head Version | HEAD |
| Bottle Stable Root URL | https://ghcr.io/v2/homebrew/core |
| Deprecated | no |
| Disabled | no |
| Keg Only | no |
| URL Keys |
|
源数据库匹配
匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。
bindgen 0.71.1-6
Automatically generate Rust FFI bindings to C and C++ libraries
https://rust-lang.github.io/rust-bindgen/
sudo apt install bindgenbindgen 0.66.1-4
Automatically generate Rust FFI bindings to C and C++ libraries
https://rust-lang.github.io/rust-bindgen/
sudo apt install bindgenbindgen-cli 0.72.1-2.fc44
Automatically generates Rust FFI bindings to C and C++ libraries
https://crates.io/crates/bindgen-cli
sudo dnf install bindgen-cli来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.