# cpu_features を Homebrew, apt, Nix でインストール

cpu_features のインストール経路、実行ファイル、メタデータ、AI エージェント向けセキュリティノートを確認します。

## インストール

```sh
sudo av install brew:cpu_features
```

追加のインストールコマンド:

### macOS

- Homebrew (100%):

```sh
brew install cpu_features
```

  証拠: local Homebrew formula metadata

### Linux

- Debian apt (92%):

```sh
sudo apt install libcpu-features-dev
```

  証拠: Debian stable package indexes: libcpu-features-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz

- Nix (92%):

```sh
nix profile install nixpkgs#cpu_features
```

  証拠: nixpkgs package indexes: pkgs/by-name/cp/cpu_features/package.nix from https://api.github.com/repos/NixOS/nixpkgs/git/trees/master?recursive=1

## パッケージ情報

- **パッケージキー:** brew:cpu_features
- **パッケージマネージャ:** Homebrew
- **バージョン:** 0.11.0
- **ソース概要:** Cross platform C99 library to get cpu features at runtime
- **ホームページ:** <https://github.com/google/cpu_features>
- **リポジトリ:** <https://github.com/google/cpu_features>
- **最終更新:** 2026-06-01T17:25:20Z
- **生成日時:** 2026-08-03T19:37:03+00:00

## 実行可能ファイル

- list_cpu_features (エイリアス)

## インストール挙動

- Bottle: 利用不可

## バージョンと鮮度

- ページ生成日: 2026-08-03
- マネージャ版: 0.11.0
## プロジェクトの歴史と使われ方

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.

### ソース

- <https://github.com/google/cpu_features>
- <https://raw.githubusercontent.com/google/cpu_features/main/README.md>
- <https://api.github.com/repos/google/cpu_features>
- <https://github.com/google/cpu_features/releases/tag/v0.11.0>


## セキュリティノート

generalized runtime or code generation signal.

- **Geiger リスク:** yellow / 中
- generalized runtime or code generation signal

## 他のパッケージマネージャ記録

- Debian apt - libcpu-features-dev - 0.9.0-1+b1: normalized package name match | Debian stable package indexes: libcpu-features-dev from https://deb.debian.org/debian/dists/stable/main/binary-amd64/Packages.xz | cross platform C99 library to get cpu features | https://github.com/google/cpu_features
- Nix - cpu_features: normalized package name match | 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 apt - libcpu-features-dev - 0.9.0-1: normalized package name match | Ubuntu 24.04 LTS package indexes: libcpu-features-dev from https://archive.ubuntu.com/ubuntu/dists/noble/universe/binary-amd64/Packages.gz | cross platform C99 library to get cpu features | https://github.com/google/cpu_features


## Combined YAML source

View the package source record on GitHub. [combined/cpu_features.yml](https://github.com/mxcl/pkgdb/blob/main/combined/cpu_features.yml)


## ソース

- pkg.so package database
- Geiger risk classifier
- curated package history
- pkgdb category and tag curation
- external package-manager database matches
- cross-ecosystem install command graph
