macOS
brew install cpu_featureslocal Homebrew formula metadata
安装
brew install cpu_featureslocal Homebrew formula metadata
sudo apt install libcpu-features-devDebian stable package indexes · libcpu-features-dev · 来源: deb.debian.org
nix profile install nixpkgs#cpu_featuresnixpkgs package indexes · pkgs/by-name/cp/cpu_features/package.nix · 来源: api.github.com
概览
Cross platform C99 library to get cpu features at runtime
历史
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.
安全态势
generalized runtime or code generation signal.
yellow 风险 · 中 置信度 · runtime
在无人值守的代理使用前,请检查该工具是否读取明文凭据、写入远程状态、发布制品或调用插件。
可执行文件
| 命令 | 类型 | 暴露范围 | 备注 |
|---|---|---|---|
list_cpu_features | cli | 全局可执行文件 |
新鲜度
这些信号区分页生成时间、软件包管理器活动和上游发布比较。只有存在证据 URL 和可比较版本时,才会提示版本落后。
https://github.com/google/cpu_features
安装元数据
| 软件包键 | 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 |
| Pulse | updated |
| 构建依赖 | cmake |
| 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 | cpu_features |
| 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 软件包链接分开显示。
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-devcpu_features
nix profile install nixpkgs#cpu_featureslibcpu-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来源线索
此页面由 av-web 从 scripts/generate-pkg-sqlite.py 生成的私有软件包 SQLite 工件提供。
View the package source record on GitHub.