{"id":19795100,"url":"https://github.com/embeddedenterprises/node-libcpuid-neo","last_synced_at":"2025-10-06T01:56:07.608Z","repository":{"id":65460842,"uuid":"428353760","full_name":"EmbeddedEnterprises/node-libcpuid-neo","owner":"EmbeddedEnterprises","description":"Simple libcpuid wrapper for node.js / Electron","archived":false,"fork":false,"pushed_at":"2021-11-15T20:06:16.000Z","size":75,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-11T04:48:24.994Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/EmbeddedEnterprises.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2021-11-15T17:10:54.000Z","updated_at":"2021-11-16T11:30:09.000Z","dependencies_parsed_at":"2023-01-24T15:05:16.395Z","dependency_job_id":null,"html_url":"https://github.com/EmbeddedEnterprises/node-libcpuid-neo","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmbeddedEnterprises%2Fnode-libcpuid-neo","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmbeddedEnterprises%2Fnode-libcpuid-neo/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmbeddedEnterprises%2Fnode-libcpuid-neo/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/EmbeddedEnterprises%2Fnode-libcpuid-neo/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/EmbeddedEnterprises","download_url":"https://codeload.github.com/EmbeddedEnterprises/node-libcpuid-neo/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":241137150,"owners_count":19916060,"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","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-11-12T07:15:26.892Z","updated_at":"2025-09-16T04:46:53.509Z","avatar_url":"https://github.com/EmbeddedEnterprises.png","language":"C++","funding_links":[],"categories":[],"sub_categories":[],"readme":"# node-libcpuid-neo\nnode-libcpuid-neo is a dead simple wrapper around [libcpuid](https://github.com/anrieff/libcpuid)\n\nThe main function is `.getCPUID()`, which returns a nice object of cpu capabilities (see Example)\n\nThis library is heavily inspired by [cpuid-node](https://github.com/terorie/cpuid-node), but attempts to fix some minor issue:\n- There is a (hopefully correct) TypeScript typing for the returned object\n- It uses `node-addon-api` (wrapper around `N-API` / `Node-API`) instead of `nan` to avoid nasty ABI issues, especially with electron\n\n## Licensing\nThis library is MIT licensed, feel free to fork it or use it in commercial projects!\n\n## Compatibility\nThe package is currently built for **Electron 14.1.1**\n\n## Notes \u0026 Building\n**This library is tailored to our needs and does not aim to be a universally compatible node package**, this repository is basically the public fork of our internal version. The main difference is that we DO NOT use `node-gyp` - You are responsible for building the package for your runtime!\n\nThe reason because we do not use `node-gyp` is that it doesn't nicely integrate with our workflow in other projects\n\nBuilding the library for local development is easy:\n\n`npm run dev-os-only` chooses the first configuration from `package.json` that matches the current OS and arch, builds it for the predefined runtime, currently **Electron 14.1.1**, and packs it\n\nBuilding the library for acutal deployment is a bit tricker:\n\nAfter much fiddling, we have decided to completely abandon crossbuilds and instead use native builds with Clang on all platforms. That works extremely well in practice, but requires you to have physical access to all device types / OSs for which you want to ship.\nInternally we use a fleet of generic Linux machines which both build natively for Linux and run Windows VMs and a bunch of Intel and ARM MacMinis...\n\n## Example\n```\n\u003e addon = require('./build/linux/x64/electron/97/addon.node')\n{ getCPUID: [Function (anonymous)] }\n\u003e addon.getCPUID()\n{\n  vendorName: 'AuthenticAMD',\n  vendor: 'amd',\n  vendorNumber: 1,\n  brand: 'AMD Ryzen Threadripper 3960X 24-Core Processor ',\n  codeName: 'Threadripper (Castle Peak)',\n  physicalCores: 24,\n  logicalCores: 48,\n  totalCores: 48,\n  clockSpeed: 2195,\n  features: {\n    fpu: true,\n    vme: true,\n    de: true,\n    pse: true,\n    tsc: true,\n    msr: true,\n    pae: true,\n    mce: true,\n    cx8: true,\n    apic: true,\n    mtrr: true,\n    sep: true,\n    pge: true,\n    mca: true,\n    cmov: true,\n    pat: true,\n    pse36: true,\n    pn: false,\n    clflush: true,\n    dts: false,\n    acpi: false,\n    mmx: true,\n    fxsr: true,\n    sse: true,\n    sse2: true,\n    ss: false,\n    ht: true,\n    tm: false,\n    ia64: false,\n    pbe: false,\n    pni: true,\n    pclmul: true,\n    dts64: false,\n    monitor: true,\n    ds_cpl: false,\n    vmx: false,\n    smx: false,\n    est: false,\n    tm2: false,\n    ssse3: true,\n    cid: false,\n    cx16: true,\n    xtpr: false,\n    pdcm: false,\n    dca: false,\n    sse4_1: true,\n    sse4_2: true,\n    syscall: true,\n    xd: false,\n    x2apic: false,\n    movbe: true,\n    popcnt: true,\n    aes: true,\n    xsave: true,\n    osxsave: true,\n    avx: true,\n    mmxext: true,\n    '3dnow': false,\n    '3dnowext': false,\n    nx: true,\n    fxsr_opt: true,\n    rdtscp: true,\n    lm: true,\n    lahf_lm: true,\n    cmp_legacy: true,\n    svm: true,\n    sse4a: true,\n    misalignsse: true,\n    abm: true,\n    '3dnowprefetch': true,\n    osvw: true,\n    ibs: true,\n    sse5: false,\n    skinit: true,\n    wdt: true,\n    ts: true,\n    fid: false,\n    vid: false,\n    ttp: true,\n    tm_amd: true,\n    stc: false,\n    '100mhzsteps': false,\n    hwpstate: true,\n    constant_tsc: true,\n    xop: false,\n    fma3: true,\n    fma4: false,\n    tbm: false,\n    f16c: true,\n    rdrand: true,\n    cpb: true,\n    aperfmperf: true,\n    pfi: false,\n    pa: false,\n    avx2: true,\n    bmi1: true,\n    bmi2: true,\n    hle: false,\n    rtm: false,\n    avx512f: false,\n    avx512dq: false,\n    avx512pf: false,\n    avx512er: false,\n    avx512cd: false,\n    sha_ni: true,\n    avx512bw: false,\n    avx512vl: false,\n    sgx: false,\n    rdseed: true,\n    adx: true,\n    avx512vnni: false,\n    avx512vbmi: false,\n    avx512vbmi2: false\n  },\n  cache: {\n    L1I: { size: 32, associativity: 8, cacheLineSize: 64 },\n    L1D: { size: 32, associativity: 8, cacheLineSize: 64 },\n    L2: { size: 512, associativity: 8, cacheLineSize: 64 },\n    L3: { size: 131072, associativity: 16, cacheLineSize: 64 },\n    L4: { size: -1, associativity: -1, cacheLineSize: -1 }\n  },\n  id: { family: 15, model: 1, stepping: 0, extFamily: 23, extModel: 49 }\n}\n```","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fembeddedenterprises%2Fnode-libcpuid-neo","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fembeddedenterprises%2Fnode-libcpuid-neo","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fembeddedenterprises%2Fnode-libcpuid-neo/lists"}