raw-cpuid
A library to parse the x86 CPUID instruction, written in rust with no external dependencies. The implementation closely resembles the Intel CPUID manual description. The library does only depend on libcore.
11.6.0
158M downloads/mo
#592 most downloaded on crates.io
gz/rust-cpuid
What this package is like to depend on
Last release 11 months ago
05 Sep 2025
Release timing varies
gaps range from 2 weeks to 12 months
Some releases are documented
notes for 19 of 52 stable releases
1 version withdrawn
withdrawn after publishing
11 years old
55 releases · first in 2015
1 release in the last 12 months
see the full history below
Release timeline
55 releases · Mar 2015 to Sep 2025Releases
latest 55-
11.6.005 Sep 2025 -
11.5.004 Mar 2025 -
11.4.017 Feb 2025 -
11.3.014 Jan 2025 -
11.2.002 Oct 2024 -
11.1.016 Jul 2024 -
11.0.229 Apr 2024 -
11.0.103 May 2023Release notes
Open source →- Fix a regression from v10.7.0. CpuIdReader was falsely required to
implement Debug for
CpuId::debug()which is too strict.
- Fix a regression from v10.7.0. CpuIdReader was falsely required to
implement Debug for
-
11.0.017 Apr 2023Release notes
Open source →Breaking changes
-
The
CpuIdtype now takes a generic reader argumentCpuId<R: CpuIdReader>: which allows for more flexibility on how cpuid is queried and better support for using the library on non-x86 targets. This is a breaking change for users ofwith_cpuid_fnand potentially when specifyingCpuIdas a type argument somewhere. To make existing code compile again, whenever a generic type argument for CpuId is needed, you can use thecpuid::NativeCpuIdReadertype which provides the default behavior of execution thecpuidinstruction.For example, in your code there might be cases where the compiler now asks you to specify the generic type of CpuId: e.g.,
fn take_cpuid(cpuid: CpuId)would become:fn take_cpuid(cpuid: CpuId<NativeCpuIdReader>) -
If you're using the
serializationfeature: It go revamped by fixing some long-standing problems with it that made it difficult to use #87. All types exceptCpuIdResulttypes lost theirSerializeandDeserializederives. Check the new example on how to serialize and deserialize cpuid information.
-
-
10.7.027 Feb 2023Release notes
Open source →- Include the pretty printing code in the library (instead of only having it in
the binary) (#137) This
introduces a new (optional)
displayfeature.displaywill also enablestdso it can't be used inno_stdenvironments.
- Include the pretty printing code in the library (instead of only having it in
the binary) (#137) This
introduces a new (optional)
-
10.6.103 Feb 2023Release notes
Open source →- Fix potential overflow during formatting when using the in cpuid binary to display cache information. (#133)
-
10.6.012 Sep 2022Release notes
Open source →- Updated termimad to 0.20 (only affects
cpuidbinary version) - Add support for AMD leaf
0x8000_001E - Add support for AMD leaf
0x8000_0019 - Updated
ExtendedFeaturesto include new features
- Updated termimad to 0.20 (only affects
-
10.5.017 Aug 2022Release notes
Open source →- Updated phf to 0.11 (only affects
cfg(test)) - Add support for AMD leaf
0x8000_001D - Add support for AMD leaf
0x8000_001A
- Updated phf to 0.11 (only affects
-
10.4.002 Aug 2022Release notes
Open source →- Added support for cpuid leaf 0x1f (Extended Topology Information v2)
- Improved debug formatting for
ProcessorCapacityAndFeatureInfo
-
10.3.019 Mar 2022Release notes
Open source →Added
- Added ExtendedFeatures::has_avx512vnni().
- Allow to build/use the crate even if
native_cpuidis not available on the target (one can still instantiate CpuId usingwith_cpuid_fnin this case).
-
10.2.031 Jul 2021 -
10.1.031 Jul 2021Release notes
Open source →Added
- AMD SVM feature leaf (0x8000_000A)
- Added methods to display upper 64-96 bits of processor serial number (
serial_all,serial_upper) - Implement
DisplayforCacheType - Implement
DisplayforTopologyType - Implement
DisplayforDatType - Implement
DisplayforAssociativity - Added
location()method forExtendedStateas an alternative foris_in_ia32_xssandis_in_xcr0. - Added new
register()method forExtendedStateto identify which register this instance refers to.
-
10.0.015 Jul 2021 withdrawnRelease notes
Open source →Breaking changes for v10
-
Removed
get_extended_function_info/ExtendedFunctionInfodue to added AMD support: Useget_processor_brand_string,get_extended_processor_and_feature_identifiers,get_l1_cache_and_tlb_info,get_l2_l3_cache_and_tlb_info,get_advanced_power_mgmt_info,get_processor_capacity_feature_infoinstead:Migration guide for replacing
get_extended_function_info/ExtendedFunctionInfo:<= v9 >= v10 processor_brand_string()CpuId.get_processor_brand_stringcache_line_size()Cpuid.get_l2_l3_cache_and_tlb_info().l2cache_line_size()l2_associativity()Cpuid.get_l2_l3_cache_and_tlb_info().l2cache_associativity()cache_size()Cpuid.get_l2_l3_cache_and_tlb_info().l2cache_size()physical_address_bits()CpuId.get_processor_capacity_feature_info().physical_address_bits()linear_address_bits()CpuId.get_processor_capacity_feature_info().linear_address_bits()has_invariant_tsc()CpuId.get_advanced_power_mgmt_info.has_invariant_tsc()has_lahf_sahf()CpuId.get_extended_processor_and_feature_identifiers().has_lahf_sahf()has_lzcnt()CpuId.get_extended_processor_and_feature_identifiers().has_lzcnt()has_prefetchw()CpuId.get_extended_processor_and_feature_identifiers().has_prefetchw()has_syscall_sysret()CpuId.get_extended_processor_and_feature_identifiers().has_syscall_sysret()has_execute_disable()CpuId.get_extended_processor_and_feature_identifiers().has_execute_disable()has_1gib_pages()CpuId.get_extended_processor_and_feature_identifiers().has_1gib_pages()has_rdtscp()CpuId.get_extended_processor_and_feature_identifiers().has_rdtscp()has_64bit_mode()CpuId.get_extended_processor_and_feature_identifiers().has_64bit_mode() -
Removed
CpuId.deterministic_address_translation_info. UseCpuId.get_deterministic_address_translation_infoinstead. -
Renamed
model_idandfamily_idtobase_model_idandbase_family_idinFeatureInfo. Added newfamily_idandmodel_idfunctions that compute the actual model and family according to the spec by joining base and extended family/model. -
Extend Hypervisor enum with more variants (#50)
-
Remove
has_rdseetfunction (deprecated since 3.2), clients should use the correctly namedhas_rdseedfunction instead.Migration guide for
cpuid.get_feature_info():<= v9 >= v10 has_rdseet()has_rdseed() -
Removed
Defaulttraits for most structs.default()should not be used anymore.
Changes
- Updated Debug trait for SGX iterators.
- Make CpuId derive Clone and Copy (#53)
- Improved documentation in some places by adding leaf numbers.
- Updated AMD leaf 0x8000_001f (Encrypted Memory) to latest manual.
ProcessorBrandString.as_str()now trims the returned string.- Fix
RdtAllocationInfo.memory_bandwidth_allocation()which was using l2cat availability to determine if it exists.
Added
- Added AMD support for leaf 0x8000_0001
- Added AMD support for leaf 0x8000_0005
- Added AMD support for leaf 0x8000_0006
- Added AMD support for leaf 0x8000_0007
- Added AMD support for leaf 0x8000_0008
Deprecated
VendorInfo.as_string()is deprecated in favor ofVendorInfo.as_str()SoCVendorBrand.as_string()is deprecated in favor ofSoCVendorBrand.as_str()
-
-
10.0.0-rc.314 Jul 2021 pre-releaseNothing published for this version
-
10.0.0-rc.213 Jul 2021 pre-releaseNothing published for this version
-
9.1.106 Jul 2021 -
9.1.004 Jul 2021Release notes
Open source →Added
- A
CpuId::with_cpuid_fnthat allows to override the default cpuid function.
Changed
- Fixed
RdtAllocationInfo.has_memory_bandwidth_allocation: was using the wrong bit - Fixed
capacity_mask_lengthinL3CatInfoandL2CatInfo: add +1 to returned value - Fixed
MemBwAllocationInfo.max_hba_throttling: add +1 to returned value - Refactored tests into a module.
- Started to add tests for Ryzen/AMD.
- A
-
9.0.103 Jul 2021Nothing published for this version
-
9.0.021 Jan 2021Nothing published for this version
-
8.1.222 Oct 2020Nothing published for this version
-
8.1.103 Jul 2020Nothing published for this version
-
8.1.015 May 2020Nothing published for this version
-
8.0.029 Apr 2020Nothing published for this version
-
7.0.421 Dec 2020Nothing published for this version
-
7.0.308 Sep 2019Nothing published for this version
-
7.0.208 Sep 2019Nothing published for this version
-
7.0.108 Sep 2019Nothing published for this version
-
7.0.008 Sep 2019Nothing published for this version
-
6.1.012 Nov 2018Nothing published for this version
-
6.0.002 Oct 2018Nothing published for this version
-
5.0.013 Jul 2018Nothing published for this version
-
4.0.019 Jun 2018Nothing published for this version
-
3.1.019 Apr 2018Nothing published for this version
-
3.0.011 Apr 2017Nothing published for this version
-
2.0.211 Apr 2017Nothing published for this version
-
2.0.108 Jun 2016Nothing published for this version
-
2.0.028 Nov 2015Nothing published for this version
-
1.0.412 Nov 2015Nothing published for this version
-
1.0.312 Nov 2015Nothing published for this version
-
1.0.213 Oct 2015Nothing published for this version
-
1.0.109 Aug 2015Nothing published for this version
-
1.0.019 Jul 2015Nothing published for this version
-
0.2.018 Jul 2015Nothing published for this version
-
0.1.117 Jul 2015Nothing published for this version
-
0.1.017 Jul 2015Nothing published for this version
-
0.0.516 Jul 2015Nothing published for this version
-
0.0.415 Jul 2015Nothing published for this version
-
0.0.308 Apr 2015Nothing published for this version
-
0.0.224 Mar 2015Nothing published for this version
-
0.0.124 Mar 2015Nothing published for this version