Automic VaultAutomic Vault

brew

使用 Homebrew, apt 安装 cffi

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

安装

其他安装命令

macOS

Homebrew已验证 · 100%
brew install cffi

local Homebrew formula metadata

Linux

Debian apt已验证 · 92%
sudo apt install cl-cffi

Debian stable package indexes · cl-cffi · 来源: deb.debian.org

概览

软件包摘要

C Foreign Function Interface for Python

命令和别名

  • cffi-gen-src

历史

项目历史与用法

CFFI is the C Foreign Function Interface for Python, used to call C libraries from Python with declarations that stay close to C header syntax. It occupies the practical middle ground between Python's ctypes, handwritten CPython extensions, and larger binding generators such as SWIG or Cython.

项目历史

The official documentation credits Armin Rigo and Maciej Fijalkowski and describes a design influenced by LuaJIT's FFI: users should mainly need to know C and Python, keep Python-related logic in Python, and choose between ABI-level and API-level access depending on portability and build needs.

PyPI lists the first cffi release, 0.1, on 2012-06-18. The 1.0.0 series in 2015 introduced the out-of-line generation model that became central to packaging CFFI-based wrappers with setuptools. Later releases continued to track newer CPython versions, PyPy use, wheels, platform support, and Python packaging changes.

采用历史

CFFI became especially important in PyPy culture because the official installation notes describe it as distributed with PyPy and as the recommended way to interface with C libraries there. On CPython, it is common in packages that need C library access without maintaining a large handwritten extension layer.

The package's official PyPI page shows sustained maintenance across many releases from 2012 through 2026, with current wheels for major CPython versions and platforms. Homebrew packages it because command-line and build workflows sometimes need the project tooling alongside Python package-manager installs.

使用方式

Typical usage starts with `from cffi import FFI`, a `cdef()` block copied or adapted from C declarations, and either `ffi.dlopen()` for ABI mode or `ffibuilder.set_source()` plus compilation for API mode. The official overview presents both in-line and out-of-line modes and recommends API mode when a C compiler is available.

CFFI is used to wrap existing shared libraries, compile small C wrapper modules, allocate C data from Python, pass buffers and structs, call function pointers, and expose Python functions to embedded interpreters.

为什么软件包爱好者会关心

CFFI is package-nerd significant because it changed the shape of Python native-library packaging: projects can describe a C interface in Python and let the build backend generate extension glue, instead of carrying a large CPython C API surface.

It is also a useful marker for interpreter-portable native bindings. Package maintainers care about whether a project uses CFFI because it affects wheels, build dependencies, PyPy compatibility, libffi availability, and whether downstream systems need compiler toolchains.

时间线

  • 2012: PyPI lists cffi 0.1 as released on 2012-06-18.
  • 2015: cffi 1.0.0 introduced out-of-line module generation.
  • 2020: cffi 1.14.1 release notes say source hosting moved to Heptapod.
  • 2025: PyPI lists cffi 2.0.0 as released on 2025-09-08.
  • 2026: PyPI lists cffi 2.1.0 as released on 2026-07-06.

Related projects

  • CFFI is discussed by its docs alongside LuaJIT FFI, ctypes, Cython, SWIG, CPython native C extensions, PyPy, pycparser, and libffi.

安全态势

尚未找到受保护工具覆盖

没有找到 cffi 的匹配本地密钥处理 manifest。Nucleus 软件包元数据仍在此发布,以便未来覆盖拥有稳定的软件包 URL。

安装行为

  • formula 元数据中未记录 Homebrew post-install 钩子。
  • Homebrew bottle 元数据适用于 8 个平台目标。
  • 安装时包含 1 个运行时依赖。
  • 构建元数据列出 2 个构建依赖。

建议审查

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

可执行文件

已安装的可执行文件

命令类型暴露范围备注
cffi-gen-srccli全局可执行文件

新鲜度

版本和新鲜度

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

页面生成时间2026-07-10
管理器版本2.1.0
管理器更新时间2026-07-08
本地数据OK
上游not checked
检测到的最新版本未检测到

https://cffi.readthedocs.io/en/latest/

安装元数据

软件包元数据

软件包键brew:cffi
版本2.1.0
软件包管理器Homebrew
软件包管理器页面https://formulae.brew.sh/formula/cffi
主页https://cffi.readthedocs.io/en/latest/
仓库https://github.com/python-cffi/cffi
上游文档https://cffi.readthedocs.io/en/stable
许可证MIT-0
源码归档https://files.pythonhosted.org/packages/57/5f/ff100cae70ebe9d8df1c01a00e510e45d9adb5c1fdda84791b199141de97/cffi-2.1.0.tar.gz
最后更新2026-07-08T03:18:52Z
Pulseupdated
依赖pycparser
构建依赖python@3.13, python@3.14
macOS 提供的库libffi
Bottle可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sequoia, sonoma, tahoe, x86_64_linux)
Homebrew post-install未定义
服务未声明

注册表事实

源数据库详情

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Namecffi
Version Scheme0
Revision0
Bottle Stable Root URLhttps://ghcr.io/v2/homebrew/core
Deprecatedno
Disabledno
Keg Onlyno
URL Keys
  • stable

源数据库匹配

其他软件包管理器记录

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

Debian apt95%

cl-cffi 1:0.24.1-3

Common Foreign Function Interface for Common Lisp

https://common-lisp.net/project/cffi/

sudo apt install cl-cffi
  • Section: lisp
  • Architecture: all
  • Source Package: cffi
  • 9 依赖
  • 2 可选依赖
  • normalized package name match
  • 匹配方式:Cffi
Debian stable package indexes · deb.debian.org · Debian stable package indexes: cl-cffi from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Ubuntu apt95%

cl-cffi 1:0.24.1-3

Common Foreign Function Interface for Common Lisp

https://common-lisp.net/project/cffi/

sudo apt install cl-cffi
  • Section: universe/devel
  • Architecture: all
  • Source Package: cffi
  • 9 依赖
  • 2 可选依赖
  • normalized package name match
  • 匹配方式:Cffi
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: cl-cffi from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz

来源线索

由仓库数据生成

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

使用的来源

  • Nucleus package database
  • cross-ecosystem install command graph
  • curated package history
  • external package-manager database matches
  • package relationship graph
  • package version freshness
  • package-page enrichment