{"id":13420502,"url":"https://github.com/anrieff/libcpuid","last_synced_at":"2025-10-21T03:58:02.398Z","repository":{"id":16858329,"uuid":"19618386","full_name":"anrieff/libcpuid","owner":"anrieff","description":"a small C library for x86 CPU detection and feature extraction","archived":false,"fork":false,"pushed_at":"2025-10-12T07:51:05.000Z","size":2390,"stargazers_count":495,"open_issues_count":4,"forks_count":120,"subscribers_count":30,"default_branch":"master","last_synced_at":"2025-10-21T03:57:51.888Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/anrieff.png","metadata":{"files":{"readme":"Readme.md","changelog":"ChangeLog","contributing":"CONTRIBUTING.md","funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":"AUTHORS","dei":null,"publiccode":null,"codemeta":null,"zenodo":null}},"created_at":"2014-05-09T16:50:29.000Z","updated_at":"2025-10-12T07:51:09.000Z","dependencies_parsed_at":"2023-09-24T12:16:16.386Z","dependency_job_id":"fe4a5143-f1af-4c2e-9ecf-27802ebfa5d8","html_url":"https://github.com/anrieff/libcpuid","commit_stats":{"total_commits":549,"total_committers":28,"mean_commits":"19.607142857142858","dds":0.5628415300546448,"last_synced_commit":"2e36c373c020419d0b732ba426840bdab09a530f"},"previous_names":[],"tags_count":17,"template":false,"template_full_name":null,"purl":"pkg:github/anrieff/libcpuid","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anrieff%2Flibcpuid","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anrieff%2Flibcpuid/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anrieff%2Flibcpuid/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anrieff%2Flibcpuid/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/anrieff","download_url":"https://codeload.github.com/anrieff/libcpuid/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/anrieff%2Flibcpuid/sbom","scorecard":{"id":197909,"data":{"date":"2025-08-11","repo":{"name":"github.com/anrieff/libcpuid","commit":"ba398f85a3fbeb68a2fd48d3a39504ece4cac78a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.7,"checks":[{"name":"Maintained","score":9,"reason":"8 commit(s) and 3 issue activity found in the last 90 days -- score normalized to 9","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Code-Review","score":0,"reason":"Found 2/30 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/build_dragonflybsd.yml:1","Warn: no topLevel permission defined: .github/workflows/build_freebsd.yml:1","Warn: no topLevel permission defined: .github/workflows/build_linux.yml:1","Warn: no topLevel permission defined: .github/workflows/build_macos.yml:1","Warn: no topLevel permission defined: .github/workflows/build_netbsd.yml:1","Warn: no topLevel permission defined: .github/workflows/build_openbsd.yml:1","Warn: no topLevel permission defined: .github/workflows/build_windows.yml:1","Info: topLevel 'contents' permission set to 'read': .github/workflows/deploy_docs.yml:14","Warn: no topLevel permission defined: .github/workflows/python.yml:1","Warn: no topLevel permission defined: .github/workflows/release.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Binary-Artifacts","score":8,"reason":"binaries present in source code","details":["Warn: binary detected: drivers/x86/windows/msr/TmpRdr.sys:1","Warn: binary detected: drivers/x86/windows/msr/TmpRdr64.sys:1"],"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"License","score":9,"reason":"license file detected","details":["Info: project has a license file: COPYING:0","Warn: project license file does not contain an FSF or OSI license."],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build_dragonflybsd.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/anrieff/libcpuid/build_dragonflybsd.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build_dragonflybsd.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/anrieff/libcpuid/build_dragonflybsd.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build_freebsd.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/anrieff/libcpuid/build_freebsd.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build_freebsd.yml:31: update your workflow using https://app.stepsecurity.io/secureworkflow/anrieff/libcpuid/build_freebsd.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build_linux.yml:26: update your workflow using https://app.stepsecurity.io/secureworkflow/anrieff/libcpuid/build_linux.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build_macos.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/anrieff/libcpuid/build_macos.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build_macos.yml:52: update your workflow using https://app.stepsecurity.io/secureworkflow/anrieff/libcpuid/build_macos.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build_netbsd.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/anrieff/libcpuid/build_netbsd.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build_netbsd.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/anrieff/libcpuid/build_netbsd.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build_openbsd.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/anrieff/libcpuid/build_openbsd.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build_openbsd.yml:30: update your workflow using https://app.stepsecurity.io/secureworkflow/anrieff/libcpuid/build_openbsd.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build_windows.yml:32: update your workflow using https://app.stepsecurity.io/secureworkflow/anrieff/libcpuid/build_windows.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/build_windows.yml:35: update your workflow using https://app.stepsecurity.io/secureworkflow/anrieff/libcpuid/build_windows.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build_windows.yml:67: update your workflow using https://app.stepsecurity.io/secureworkflow/anrieff/libcpuid/build_windows.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/build_windows.yml:85: update your workflow using https://app.stepsecurity.io/secureworkflow/anrieff/libcpuid/build_windows.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/deploy_docs.yml:34: update your workflow using https://app.stepsecurity.io/secureworkflow/anrieff/libcpuid/deploy_docs.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/deploy_docs.yml:36: update your workflow using https://app.stepsecurity.io/secureworkflow/anrieff/libcpuid/deploy_docs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/deploy_docs.yml:50: update your workflow using https://app.stepsecurity.io/secureworkflow/anrieff/libcpuid/deploy_docs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/deploy_docs.yml:53: update your workflow using https://app.stepsecurity.io/secureworkflow/anrieff/libcpuid/deploy_docs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/deploy_docs.yml:59: update your workflow using https://app.stepsecurity.io/secureworkflow/anrieff/libcpuid/deploy_docs.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python.yml:17: update your workflow using https://app.stepsecurity.io/secureworkflow/anrieff/libcpuid/python.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/python.yml:18: update your workflow using https://app.stepsecurity.io/secureworkflow/anrieff/libcpuid/python.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:15: update your workflow using https://app.stepsecurity.io/secureworkflow/anrieff/libcpuid/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:28: update your workflow using https://app.stepsecurity.io/secureworkflow/anrieff/libcpuid/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:37: update your workflow using https://app.stepsecurity.io/secureworkflow/anrieff/libcpuid/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:46: update your workflow using https://app.stepsecurity.io/secureworkflow/anrieff/libcpuid/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:55: update your workflow using https://app.stepsecurity.io/secureworkflow/anrieff/libcpuid/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:73: update your workflow using https://app.stepsecurity.io/secureworkflow/anrieff/libcpuid/release.yml/master?enable=pin","Warn: pipCommand not pinned by hash: .github/workflows/python.yml:34","Warn: pipCommand not pinned by hash: .github/workflows/python.yml:39","Warn: pipCommand not pinned by hash: .github/workflows/python.yml:42","Warn: pipCommand not pinned by hash: .github/workflows/python.yml:47","Info:   0 out of  17 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of  11 third-party GitHubAction dependencies pinned","Info:   0 out of   4 pipCommand dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v0.8.0 not signed: https://api.github.com/repos/anrieff/libcpuid/releases/216347003","Warn: release artifact v0.7.1 not signed: https://api.github.com/repos/anrieff/libcpuid/releases/188298761","Warn: release artifact v0.7.0 not signed: https://api.github.com/repos/anrieff/libcpuid/releases/171905957","Warn: release artifact v0.6.5 not signed: https://api.github.com/repos/anrieff/libcpuid/releases/153130594","Warn: release artifact v0.6.4 not signed: https://api.github.com/repos/anrieff/libcpuid/releases/124296742","Warn: release artifact v0.8.0 does not have provenance: https://api.github.com/repos/anrieff/libcpuid/releases/216347003","Warn: release artifact v0.7.1 does not have provenance: https://api.github.com/repos/anrieff/libcpuid/releases/188298761","Warn: release artifact v0.7.0 does not have provenance: https://api.github.com/repos/anrieff/libcpuid/releases/171905957","Warn: release artifact v0.6.5 does not have provenance: https://api.github.com/repos/anrieff/libcpuid/releases/153130594","Warn: release artifact v0.6.4 does not have provenance: https://api.github.com/repos/anrieff/libcpuid/releases/124296742"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 2 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}}]},"last_synced_at":"2025-08-16T22:10:12.882Z","repository_id":16858329,"created_at":"2025-08-16T22:10:12.882Z","updated_at":"2025-08-16T22:10:12.882Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":280200870,"owners_count":26289477,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-10-21T02:00:06.614Z","response_time":58,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-07-30T22:01:35.004Z","updated_at":"2025-10-21T03:58:02.393Z","avatar_url":"https://github.com/anrieff.png","language":"C","readme":"# libcpuid\n\nlibcpuid provides CPU identification. Project website is on SourceForge (https://libcpuid.sourceforge.net).\n\n## Support\n\n### CPU architectures\n\n- x86:\n  - 32-bit CPUs (IA-32, also known as i386, i486, i586 and i686)\n  - 64-bit CPUs (x86_64, also known as x64, AMD64, and Intel 64)\n- ARM (since v0.7.0):\n  - 32-bit CPUs (ARM32, also known as AArch32)\n  - 64-bit CPUs (ARM64, also known as AArch64)\n\n### Operating systems\n\nlibcpuid support varies depending on the features:\n- build: code build, generate libraries and binaries\n- x86 MSR : access to x86 model-specific registers\n- ARM CPUID : access to ARM registers\n\n|Name|Build|x86 MSR|ARM CPUID|\n|----|----|-------|---------|\n|DragonFly BSD|[![Build (DragonFly BSD)](https://github.com/anrieff/libcpuid/actions/workflows/build_dragonflybsd.yml/badge.svg)](https://github.com/anrieff/libcpuid/actions/workflows/build_dragonflybsd.yml)|:grey_question: ([`cpuctl` kernel module](https://man.freebsd.org/cgi/man.cgi?query=cpuctl))|:x:|\n|FreeBSD|[![Build (FreeBSD)](https://github.com/anrieff/libcpuid/actions/workflows/build_freebsd.yml/badge.svg)](https://github.com/anrieff/libcpuid/actions/workflows/build_freebsd.yml)|:heavy_check_mark: ([`cpuctl` kernel module](https://man.freebsd.org/cgi/man.cgi?query=cpuctl))|:heavy_check_mark:¹ ([`cpuid` out-of-tree kernel module](https://github.com/anrieff/libcpuid/tree/master/drivers/arm/freebsd))|\n|Linux|[![Build (Linux)](https://github.com/anrieff/libcpuid/actions/workflows/build_linux.yml/badge.svg)](https://github.com/anrieff/libcpuid/actions/workflows/build_linux.yml)|:heavy_check_mark: ([`msr` kernel module](https://man7.org/linux/man-pages/man4/msr.4.html))|:heavy_check_mark:¹ ([`cpuid` out-of-tree kernel module](https://github.com/anrieff/libcpuid/tree/master/drivers/arm/linux))|\n|macOS|[![Build (macOS)](https://github.com/anrieff/libcpuid/actions/workflows/build_macos.yml/badge.svg)](https://github.com/anrieff/libcpuid/actions/workflows/build_macos.yml)|:x:|:x:|\n|NetBSD|[![Build (NetBSD)](https://github.com/anrieff/libcpuid/actions/workflows/build_netbsd.yml/badge.svg)](https://github.com/anrieff/libcpuid/actions/workflows/build_netbsd.yml)|:x:|:x:|\n|OpenBSD|[![Build (OpenBSD)](https://github.com/anrieff/libcpuid/actions/workflows/build_openbsd.yml/badge.svg)](https://github.com/anrieff/libcpuid/actions/workflows/build_openbsd.yml)|:x:|:x:|\n|Windows|[![Build (Windows)](https://github.com/anrieff/libcpuid/actions/workflows/build_windows.yml/badge.svg)](https://github.com/anrieff/libcpuid/actions/workflows/build_windows.yml)|:heavy_check_mark: ([`msr` driver](https://github.com/anrieff/libcpuid/tree/master/drivers/x86/windows/msr))|:x:|\n\nLegend:\n- :heavy_check_mark: Supported\n- :grey_question: Likely supported, not heavily tested\n- :x: Not supported\n- **¹** On AArch32 state, the kernel module is required. On AArch64 state, the kernel module is optional, because the kernel can trap the [`MRS` instruction](https://developer.arm.com/documentation/dui0473/m/arm-and-thumb-instructions/mrs--system-coprocessor-register-to-arm-register-)\n\n## Getting started\n\nYou have two ways to get libcpuid:\n- build it from sources\n- download a pre-compiled binary\n\n### Sources\n\n#### Prerequisites\n\nUsing libcpuid requires no dependencies on any of the supported OSes.\nBuilding it requires build tool commands to be available,\nwhich is a matter of installing a few common packages\nwith related names (e.g. automake, autoconf, libtool, cmake).\nIt also requires a POSIX-compatible shell. On NetBSD, you may need\nto install one (credits to @brucelilly):\n\n1. Install a POSIX-compatible shell such as ksh93\n```shell\npkg_add ast-ksh || pkgin in ast-ksh\n```\n2. Export `CONFIG_SHELL` with correct path if required:\n```shell\nexport CONFIG_SHELL=/usr/pkg/bin/ksh93\n```\n\n#### Configuring after checkout\n\nTwo build systems are supported, use the one you prefer.\n\n##### By using autotools\n\nUnder POSIX systems, where you download the sources, there's no\nconfigure script to run. This is because it isn't a good practice to keep\nsuch scripts in a source control system. To create it, you need to run the\nfollowing commands once, after you checkout the libcpuid sources\nfrom GitHub:\n```shell\nlibtoolize\nautoreconf --install\n```\n\nYou need to have `autoconf`, `automake` and `libtool` installed.\n\nAfter that you can run `./configure` and `make` - this will build\nthe library.\n\n`make dist` will create a tarball (with \"configure\" inside) with the\nsources.\n\n##### By using CMake\n\nCMake options for libcpuid (use `cmake -LH` to list all options):\n- `LIBCPUID_ENABLE_DOCS`: enable building documentation by using Doxyen (**ON** by default)\n- `LIBCPUID_ENABLE_TESTS`: enable tests targets, like `test-fast`, `test-old` and `fix-tests` (**OFF** by default)\n- `LIBCPUID_BUILD_DEPRECATED`: build support of deprecated attributes (**ON** by default to guarantee backward compatibility)\n- `LIBCPUID_BUILD_DRIVERS`: enable building kernel drivers (**ON** by default)\n- `LIBCPUID_DRIVER_DEBUG`: enable debug mode flr kernel drivers (**OFF** by default)\n- `LIBCPUID_DRIVER_ARM_LINUX_DKMS`: use DKMS for CPUID Linux kernel module for ARM (**ON** by default), switch off to build the kernel module in the `build` directory\n\nBasic example to build and install libcpuid by using CMake:\n```shell\ncmake -S . -B build -DCMAKE_BUILD_TYPE=RelWithDebInfo -DLIBCPUID_ENABLE_TESTS=ON\ncmake --build build\ncmake --install build # may need administrative privileges, install under /usr/local by default\n```\n\n### Downloads\n\nYou can find latest versioned archives [here](https://github.com/anrieff/libcpuid/releases/latest), with binaries for macOS and Windows.\n\n#### Binary packages\n\nAlso, libcpuid is available for following systems in official repositories:\n\n* [Arch Linux](https://archlinux.org/packages/extra/x86_64/libcpuid/): `pacman -S libcpuid`\n* [Debian (since version 11 \"Bullseye\")](https://packages.debian.org/source/bullseye/libcpuid): `apt install cpuidtool libcpuid-dev`\n* [Fedora (since version 25)](https://src.fedoraproject.org/rpms/libcpuid): `dnf install libcpuid libcpuid-devel`\n* [FreeBSD (since version 11)](https://www.freshports.org/sysutils/libcpuid): `pkg install libcpuid`\n* [OpenMandriva Lx (since version 4.0 \"Nitrogen\")](https://github.com/OpenMandrivaAssociation/libcpuid): `dnf install libcpuid-tools libcpuid-devel`\n* [openSUSE Leap (since version 15.1)](https://software.opensuse.org/package/libcpuid): `zypper install libcpuid-tools libcpuid-devel`\n* [Solus](https://packages.getsol.us/shannon/libc/libcpuid/): `eopkg install libcpuid libcpuid-devel`\n* [Ubuntu (since version 20.04 \"Focal Fossa\")](https://packages.ubuntu.com/source/focal/libcpuid) : `apt install cpuidtool libcpuid-dev`\n\nBelow, the full lists of repositories:  \n[![Packaging status](https://repology.org/badge/vertical-allrepos/libcpuid.svg?exclude_unsupported=1)](https://repology.org/project/libcpuid/versions)\n\n#### Build tool\n\n* Vcpkg: `vcpkg install cpuid`\n\n## Usage\n\n### As a software developer\n\n#### Native C library\n\nFor details about the programming API, you might want to take a look at the short [tutorial](https://libcpuid.sourceforge.net/documentation.html), as well as the full [API reference](https://anrieff.github.io/libcpuid).\n\n#### Python bindings\n\nThe libcpuid library features Python bindings, which can be installed as a library\nusing `python -m pip install libcpuid`. Visit the\n[documentation at Read the Docs](https://libcpuid.readthedocs.io/en/latest/index.html#)\nto see how the library is used.\n\n### As an end-user\n\nYou can use the `cpuid_tool` command. Pass the `--help` argument to display usage:\n```\nUsage: cpuid_tool [options]\n\nOptions:\n  -h, --help       - Show this help\n  --load=\u003cfile\u003e    - Load raw CPUID data from file\n  --save=\u003cfile\u003e    - Acquire raw CPUID data and write it to file\n  --report, --all  - Report all decoded CPU info (w/o clock)\n  --clock          - in conjunction to --report: print CPU clock as well\n  --clock-rdtsc    - same as --clock, but use RDTSC for clock detection\n  --cpulist        - list all known CPUs\n  --sgx            - list SGX leaf data, if SGX is supported.\n  --hypervisor     - print hypervisor vendor if detected.\n  --quiet          - disable warnings\n  --outfile=\u003cfile\u003e - redirect all output to this file, instead of stdout\n  --verbose, -v    - be extra verbose (more keys increase verbosiness level)\n  --version        - print library version\n\nQuery switches (generate 1 line of output per switch; in order of appearance):\n  --cpuid, --architecture, --feature-level, --purpose, --vendorstr, \n  --vendorid, --brandstr, --family, --model, --stepping, --extfamily, \n  --extmodel, --implementer, --variant, --part-num, --revision, --cores, \n  --logical, --total-cpus, --affi-mask, --l1d-cache, --l1i-cache, --cache, \n  --l2-cache, --l3-cache, --l4-cache, --l1d-assoc, --l1i-assoc, --l2-assoc, \n  --l3-assoc, --l4-assoc, --l1d-cacheline, --l1i-cacheline, --l2-cacheline, \n  --l3-cacheline, --l4-cacheline, --l1d-instances, --l1i-instances, \n  --l2-instances, --l3-instances, --l4-instances, --codename, --technology, \n  --flags, --clock, --clock-os, --clock-rdtsc, --clock-ic, --rdmsr, \n  --rdmsr-raw, --sse-size\n\nIf `-' is used for \u003cfile\u003e, then stdin/stdout will be used instead of files.\nWhen no options are present, the program behaves as if it was invoked with\n  cpuid_tool \"--save=raw.txt --outfile=report.txt --report --verbose\"\n```\n\n## Contributing\n\nRefer to the [dedicated page](CONTRIBUTING.md).\n\n## Users\n\nSo far, I'm aware of the following projects which utilize libcpuid (listed alphabetically):\n\n* CPU-X (https://github.com/TheTumultuousUnicornOfDarkness/CPU-X)\n* fre:ac (https://www.freac.org/)\n* I-Nex (https://github.com/i-nex/I-Nex)\n* Multiprecision Computing Toolbox for MATLAB (https://www.advanpix.com/)\n* Nix (https://nixos.org/nix)\n* ucbench (http://anrieff.net/ucbench)\n\nWe'd love to hear from you if you are also using libcpuid and want your project listed above.\n","funding_links":[],"categories":["TODO scan for Android support in followings","Miscellaneous","排序","多项混杂"],"sub_categories":["多项混杂"],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanrieff%2Flibcpuid","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fanrieff%2Flibcpuid","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fanrieff%2Flibcpuid/lists"}