#cpuid #hardware #no-alloc #cpu #midr

no-std libcpuname

Identify CPU vendors, chips, and cores across multiple architectures

4 releases

0.1.3 Aug 23, 2025
0.1.2 Jul 12, 2025
0.1.1 Jul 10, 2025
0.1.0 Jul 10, 2025

#1726 in Encoding

Download history

268 downloads per month

Apache-2.0 OR MIT

190KB
4.5K SLoC

libcpuname

REUSE status Pipeline status docs.rs Crates.io Version Crates.io MSRV

libcpuname is a Rust library that provides lookup tables for the names of CPU manufacturers and designers, CPU chip designs, and CPU core microarchitectures. The following instruction set architectures are supported:

  • x86 (both 32-bit and 64-bit CPUs)
  • ARM
  • RISC-V

Quickstart

Add libcpuname to your project as a dependency:

cargo add libcpuname

Features

The architecture corresponding to the host's target triple is enabled by default via the native feature. Other architectures can be enabled individually or wholesale. The following features are available:

  • std (enabled by default): Link against the std crate. This enables impls of std::error::Error
  • native (enabled by default): Exposes the module that matches the host's target triple
  • arm: Exposes the arm module
  • riscv: Exposes the riscv module
  • x86: Exposes the x86 module

License

libcpuname is dual-licensed under the Apache-2.0 and MIT open-source licenses.

No runtime deps