Automic VaultAutomic Vault

brew

使用 Homebrew, apt, dnf 安装 bindgen

查看 bindgen 的安装路径、可执行文件、元数据以及面向 AI 代理工作流的安全说明。

安装

其他安装命令

macOS

Homebrew已验证 · 100%
brew install bindgen

local Homebrew formula metadata

Linux

Debian apt已验证 · 92%
sudo apt install bindgen

Debian stable package indexes · bindgen · 来源: deb.debian.org

Fedora dnf已验证 · 92%
sudo dnf install bindgen-cli

Fedora Rawhide package metadata · bindgen-cli · 来源: dl.fedoraproject.org

概览

软件包摘要

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

命令和别名

  • bindgen

历史

项目历史与用法

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.

时间线

  • 2014: bindgen crate first appears on crates.io.
  • 2016: rust-lang/rust-bindgen GitHub repository is created.
  • 2024: 0.70.x and 0.71.x releases continue the modern changelog line.
  • 2025: 0.72.1 is published on crates.io and GitHub releases.

Related projects

  • Related Rust FFI projects include cbindgen, which emits C headers from Rust APIs, and clang-sys, which exposes libclang bindings used by bindgen. In downstream packages, bindgen often appears beside cc, pkg-config, and system library development headers.

来源

  • GitHub API reports repository creation in 2016.
  • GitHub README documents purpose, user guide, environment variables, and release policy.
  • crates.io API reports first crate publication in 2014, latest version, and download adoption.
  • input.source_facts.package-manager lists distro/package-manager availability.

安全态势

风险级别:绿色

narrow executable package without higher-risk signals.

风险分类器

绿色 风险 · 低 置信度 · appliance

原因

  • narrow executable package without higher-risk signals

信号

  • metadata:no-higher-risk-signals

安装行为

  • formula 元数据中未记录 Homebrew post-install 钩子。
  • Homebrew bottle 元数据适用于 6 个平台目标。
  • 构建元数据列出 1 个构建依赖。

建议审查

在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。

local files

Configuration and credential file locations

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.

Configuration files

Config paths the tool may read or write during local use.

Unix
rustfmt.toml in the directory where bindgen is run

可执行文件

已安装的可执行文件

命令类型暴露范围备注
bindgencli全局可执行文件

新鲜度

版本和新鲜度

这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。

页面生成时间2026-07-08
管理器版本0.72.1
管理器更新时间
本地数据OK
上游当前
检测到的最新版本v0.72.1

https://github.com/rust-lang/rust-bindgen

  • 信息No package-manager update timestamp was available.低 置信度

安装元数据

软件包元数据

软件包键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 DatabaseHomebrew formula API
Taphomebrew/core
Full Namebindgen
Version Scheme0
Revision0
Head VersionHEAD
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • head
  • stable

源数据库匹配

其他软件包管理器记录

匹配项来自外部软件包管理器索引,并与本地 Automic Vault 软件包链接分开显示。

Debian apt95%

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 bindgen
  • Section: rust
  • Architecture: amd64
  • Source Package: rust-bindgen-cli
  • 3 依赖
  • 1 可选依赖
  • normalized package name match
  • 匹配方式:Bindgen
Debian stable package indexes · deb.debian.org · Debian stable package indexes: bindgen from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Ubuntu apt95%

bindgen 0.66.1-4

Automatically generate Rust FFI bindings to C and C++ libraries

https://rust-lang.github.io/rust-bindgen/

sudo apt install bindgen
  • Section: universe/rust
  • Architecture: amd64
  • Source Package: rust-bindgen-cli
  • 2 依赖
  • normalized package name match
  • 匹配方式:Bindgen
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: bindgen from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz
dnf95%

bindgen-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
  • License: BSD-3-Clause AND Apache-2.0 AND ISC AND MIT AND Unicode-3.0 AND Unicode-DFS-2016 AND (Apache-2.0 OR MIT) AND (Unlicense OR MIT)
  • Category: Unspecified
  • Architecture: x86_64
  • Source Package: rust-bindgen-cli
  • 6 依赖
  • 2 提供
  • normalized package name match
  • 匹配方式:Bindgen
Fedora Rawhide package metadata · dl.fedoraproject.org · Fedora Rawhide package metadata: bindgen-cli from https://dl.fedoraproject.org/pub/fedora/linux/development/rawhide/Everything/x86_64/os/repodata/e5ca8ce900cd68f5419e1c39ae517343100b306336cbaeb70a3c153121d95094-primary.xml.zst

来源线索

由仓库数据生成

此页面由 av-webscripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。

使用的来源

  • Geiger risk classifier
  • Nucleus package database
  • av.db category and tag curation
  • cross-ecosystem install command graph
  • curated configuration and credential file locations
  • curated package history
  • external package-manager database matches
  • package relationship graph
  • package version freshness
  • package-page enrichment