# Install cpu_features with Homebrew, apt, Nix

Cross platform C99 library to get cpu features at runtime. Version 0.11.0 via Homebrew; verified 2026-06-01.

## Install

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

Additional install commands:

### macOS

- Homebrew (100%):

```sh
brew install cpu_features
```

  Evidence: local Homebrew formula metadata

### Linux

- Debian apt (92%):

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

  Evidence: 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
```

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

## Package facts

- **Package key:** brew:cpu_features
- **Package manager:** Homebrew
- **Package manager page:** <https://formulae.brew.sh/formula/cpu_features>
- **Version:** 0.11.0
- **Source summary:** Cross platform C99 library to get cpu features at runtime
- **Homepage:** <https://github.com/google/cpu_features>
- **Repository:** <https://github.com/google/cpu_features>
- **Upstream docs:** <https://github.com/google/cpu_features#readme>
- **License:** Apache-2.0
- **Source archive:** <https://github.com/google/cpu_features/archive/refs/tags/v0.11.0.tar.gz>
- **Last updated:** 2026-06-01T17:25:20Z
- **Generated:** 2026-07-08T07:18:31+00:00

## Executables

- list_cpu_features (cli)
- list_cpu_features (alias)

## Build dependencies

- cmake

## Install behavior

- Post-install hook: not defined
- Bottle: available on arm64_linux, arm64_sequoia, arm64_sonoma, arm64_tahoe, sonoma, x86_64_linux

## Freshness

- Page generated: 2026-07-08
- Package-manager version: 0.11.0
- Package-manager updated: 2026-06-01
- Local data: ok
- Upstream repository: https://github.com/google/cpu_features
- Upstream latest detected: v0.11.0 (current)
## Project history and usage

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

### Project history

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.

### Adoption history

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.

### How it is used

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.

### Why package nerds care

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.

### Timeline

- 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.

### Sources

- <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>


## Security Notes

generalized runtime or code generation signal.

- **Geiger risk:** yellow / medium
- generalized runtime or code generation signal

## Source Database Details

- **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:** head, stable

## Other Package-Manager Records

- 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


## Related links

- [Source-control packages](https://www.automicvault.com/pkg/source-control-tools/) - Belongs to a source-control command family.
- [Secret-risk packages](https://www.automicvault.com/pkg/secret-risk-packages/) - Has protected-tool coverage, approval-gate, or non-low Geiger security signals.
- [Terminal utility packages](https://www.automicvault.com/pkg/terminal-utilities/) - Matched terminal and command-line workflow metadata.
- [Language runtime packages](https://www.automicvault.com/pkg/language-runtime-packages/) - Matched language runtime, compiler, or interpreter metadata.
- [cmake](https://www.automicvault.com/pkg/brew/cmake/) - Build dependency declared by Homebrew.
- [volk](https://www.automicvault.com/pkg/brew/volk/) - Popular package that depends on this formula.
- [cpuid](https://www.automicvault.com/pkg/brew/cpuid/) - Shares av.db curated category or tags: cli, cpu, cpu-features, hardware-detection, library.
- [augeas](https://www.automicvault.com/pkg/brew/augeas/) - Shares av.db curated category or tags: cli, library, system.
- [cahute](https://www.automicvault.com/pkg/brew/cahute/) - Shares av.db curated category or tags: cli, library, system.
- [chmlib](https://www.automicvault.com/pkg/brew/chmlib/) - Shares av.db curated category or tags: cli, library, system.
- [cpufetch](https://www.automicvault.com/pkg/brew/cpufetch/) - Shares av.db curated category or tags: cli, cpu, system.
- [cpulimit](https://www.automicvault.com/pkg/brew/cpulimit/) - Shares av.db curated category or tags: cli, cpu, system.
- [dbus-glib](https://www.automicvault.com/pkg/brew/dbus-glib/) - Shares av.db curated category or tags: cli, library, system.
- [hivex](https://www.automicvault.com/pkg/brew/hivex/) - Shares av.db curated category or tags: cli, library, system.
- [libcpuid](https://www.automicvault.com/pkg/brew/libcpuid/) - Local package facts share a topical domain. Shared terms: cli, cpu, detection, hardware, library.

## Combined YAML source

View the package source record on GitHub. [combined/cpu_features.yml](https://github.com/automic-vault/db/blob/main/combined/cpu_features.yml)


## Sources

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