Automic VaultAutomic Vault

brew

使用 Homebrew, apt, Nix 安装 cpu_features

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

安装

其他安装命令

macOS

Homebrew已验证 · 100%
brew install cpu_features

local Homebrew formula metadata

Linux

Debian apt已验证 · 92%
sudo apt install libcpu-features-dev

Debian stable package indexes · libcpu-features-dev · 来源: deb.debian.org

Nix已验证 · 92%
nix profile install nixpkgs#cpu_features

nixpkgs package indexes · pkgs/by-name/cp/cpu_features/package.nix · 来源: api.github.com

概览

软件包摘要

Cross platform C99 library to get cpu features at runtime

命令和别名

  • list_cpu_features

历史

项目历史与用法

cpu_features is Google's portable C99 library for detecting CPU instruction-set and microarchitecture features at runtime.

项目历史

The official repository was created in 2018. Its README emphasizes portability, old-compiler compatibility, sandbox-aware detection strategies, thread safety, no allocation, no exceptions, unit tests, and suitability for low-level code such as libc-style routines.

采用历史

The README positions cpu_features as cross-platform infrastructure across Linux, macOS, Windows, Android, and several CPU families. It also describes Android support and an NDK cpu-features.h compatibility layer, making it relevant to projects that need runtime dispatch without depending on platform-specific probes.

使用方式

Users include architecture-specific headers such as cpuinfo_x86.h or cpuinfo_arm.h, read feature structures returned by GetX86Info or GetArmInfo, and select optimized code paths based on runtime CPU support. The package also builds list_cpu_features for inspecting detected features, including JSON output.

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

For packagers, cpu_features is a small but foundational library: it helps upstreams choose optimized code paths while still shipping generic binaries, and it is designed to build with CMake, Bazel, and Zig across many architectures.

时间线

  • 2018: The google/cpu_features repository was created.
  • 2025: v0.10.x releases were published from the official GitHub repository.
  • 2026: v0.11.0 was published from the official GitHub repository.

Related projects

  • The README describes cpu_features as an Android NDK cpu-features.h drop-in replacement.

安全态势

风险级别:yellow

generalized runtime or code generation signal.

风险分类器

yellow 风险 · 中 置信度 · runtime

原因

  • generalized runtime or code generation signal

信号

  • text:runtime

安装行为

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

建议审查

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

可执行文件

已安装的可执行文件

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

新鲜度

版本和新鲜度

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

页面生成时间2026-07-10
管理器版本0.11.0
管理器更新时间2026-06-01
本地数据OK
上游当前
检测到的最新版本v0.11.0

https://github.com/google/cpu_features

  • OK没有生成新鲜度警告。

安装元数据

软件包元数据

软件包键brew:cpu_features
版本0.11.0
软件包管理器Homebrew
软件包管理器页面https://formulae.brew.sh/formula/cpu_features
主页https://github.com/google/cpu_features
仓库https://github.com/google/cpu_features
上游文档https://github.com/google/cpu_features#readme
许可证Apache-2.0
源码归档https://github.com/google/cpu_features/archive/refs/tags/v0.11.0.tar.gz
最后更新2026-06-01T17:25:20Z
Pulseupdated
构建依赖cmake
Bottle可用 (于 arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux)
Homebrew post-install未定义
服务未声明

注册表事实

源数据库详情

Source DatabaseHomebrew formula API
Taphomebrew/core
Full Namecpu_features
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%

libcpu-features-dev 0.9.0-1+b1

cross platform C99 library to get cpu features

https://github.com/google/cpu_features

sudo apt install libcpu-features-dev
  • Section: libdevel
  • Architecture: amd64
  • Source Package: cpu-features
  • normalized package name match
  • 匹配方式:Cpu Features
Debian stable package indexes · deb.debian.org · Debian stable package indexes: libcpu-features-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz
Nix95%

cpu_features

nix profile install nixpkgs#cpu_features
  • normalized package name match
  • 匹配方式:Cpu Features
nixpkgs package indexes · api.github.com · nixpkgs package indexes: pkgs/by-name/cp/cpu_features/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1
Ubuntu apt95%

libcpu-features-dev 0.9.0-1

cross platform C99 library to get cpu features

https://github.com/google/cpu_features

sudo apt install libcpu-features-dev
  • Section: universe/libdevel
  • Architecture: amd64
  • Source Package: cpu-features
  • normalized package name match
  • 匹配方式:Cpu Features
Ubuntu 24.04 LTS package indexes · archive.ubuntu.com · Ubuntu 24.04 LTS package indexes: libcpu-features-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz

来源线索

由仓库数据生成

此页面由 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 package history
  • external package-manager database matches
  • package relationship graph
  • package version freshness
  • package-page enrichment