{"_id":"@bun-win32/dxcore","_rev":"4-a946753e3a2be627bfa1d660ebc8a0e2","name":"@bun-win32/dxcore","dist-tags":{"latest":"2.0.1"},"versions":{"1.0.0":{"name":"@bun-win32/dxcore","version":"1.0.0","keywords":["bun","ffi","win32","windows","dxcore","bindings","typescript","dll"],"author":"Stev Peifer <stev@bell.net>","license":"MIT","_id":"@bun-win32/dxcore@1.0.0","maintainers":[{"name":"obscuritysrl","email":"stev@bell.net"}],"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dist":{"shasum":"838b36af4482f7d35d3de4b0953aa4e9bc76a6a0","tarball":"https://registry.npmjs.org/@bun-win32/dxcore/-/dxcore-1.0.0.tgz","fileCount":6,"integrity":"sha512-aL1rqAlMol3aYyNWtJfwsrC3ktVP+Ss9zMbXKxk2FyHypMZtCOOTdG1fSD2PJumLt3Pfhp2Thw+/+1jg0YfBSg==","signatures":[{"sig":"MEUCIQDOKL6O5bgUutAX6jwI3Js7LJwJWACkls0SI9+ulykwhwIgbhZj1D069a7UMfPdk5Nl2jiI56xnyIOodOmlSwF+CsA=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10426},"main":"./index.ts","type":"module","module":"index.ts","shasum":"838b36af4482f7d35d3de4b0953aa4e9bc76a6a0","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:adapter-report":"bun ./example/adapter-report.ts","example:gpu-constellation":"bun ./example/gpu-constellation.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev@bell.net"},"_integrity":"sha512-aL1rqAlMol3aYyNWtJfwsrC3ktVP+Ss9zMbXKxk2FyHypMZtCOOTdG1fSD2PJumLt3Pfhp2Thw+/+1jg0YfBSg==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/dxcore"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 DXCore bindings for Bun (FFI) on Windows.","directories":{},"sideEffects":false,"_nodeVersion":"24.3.0","dependencies":{"@bun-win32/core":"1.1.2"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/dxcore_1.0.0_1779077511200_0.6996049102798649","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@bun-win32/dxcore","version":"1.0.1","keywords":["bun","ffi","win32","windows","dxcore","bindings","typescript","dll"],"author":"Stev Peifer <stev.p@outlook.com>","license":"MIT","_id":"@bun-win32/dxcore@1.0.1","maintainers":[{"name":"obscuritysrl","email":"stev@bell.net"}],"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dist":{"shasum":"ca7343a63c9fc0bcde9d55b4f7dedf7fc349d6c8","tarball":"https://registry.npmjs.org/@bun-win32/dxcore/-/dxcore-1.0.1.tgz","fileCount":6,"integrity":"sha512-kxZEDN4muuXwO8dNzKJaN4DOaENiqXrvOA/VYrwuNl6UW5D5FAYZ4BBHzGjro0tmq9Jd+MW9/CHqBFPkud94Lw==","signatures":[{"sig":"MEUCIC2bJmuW13MIK2hlBeob0EU7Ls1vTV+BZ+QxSQcjOoqUAiEA/x4qy7pNe8r/4B3M5LD7OTjwggYKYyuvA+Og2+UP/9o=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":10431},"main":"./index.ts","type":"module","module":"index.ts","shasum":"ca7343a63c9fc0bcde9d55b4f7dedf7fc349d6c8","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:adapter-report":"bun ./example/adapter-report.ts","example:gpu-constellation":"bun ./example/gpu-constellation.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev@bell.net"},"_integrity":"sha512-kxZEDN4muuXwO8dNzKJaN4DOaENiqXrvOA/VYrwuNl6UW5D5FAYZ4BBHzGjro0tmq9Jd+MW9/CHqBFPkud94Lw==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/dxcore"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 DXCore bindings for Bun (FFI) on Windows.","directories":{},"sideEffects":false,"_nodeVersion":"24.3.0","dependencies":{"@bun-win32/core":"1.1.4"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/dxcore_1.0.1_1781130826447_0.108656212271532","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@bun-win32/dxcore","version":"2.0.0","keywords":["bun","ffi","win32","windows","dxcore","bindings","typescript","dll"],"author":"Stev Peifer <stev.p@outlook.com>","license":"MIT","_id":"@bun-win32/dxcore@2.0.0","maintainers":[{"name":"obscuritysrl","email":"stev.p@outlook.com"}],"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dist":{"shasum":"99e4fd44c21db7ad22761324a887f4a9256b04b6","tarball":"https://registry.npmjs.org/@bun-win32/dxcore/-/dxcore-2.0.0.tgz","fileCount":6,"integrity":"sha512-Zn+81rk/p7BDDysdZhq55D2duC9nScPxhUOKZMFTkuTFZT9z+oHvKGfNyZajLAnXUII6qCUI+ZFfQ19TF9Y77g==","signatures":[{"sig":"MEUCIAdIvH5StoyEGdwO7rYz7hVbYSVap7GSx90zCQSshEWUAiEA2RKKsWcs9H2XtNnoMWloiY3J6BmfVUxExWywjx817W4=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11679},"main":"./index.ts","type":"module","module":"index.ts","shasum":"99e4fd44c21db7ad22761324a887f4a9256b04b6","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:adapter-report":"bun ./example/adapter-report.ts","example:gpu-constellation":"bun ./example/gpu-constellation.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev.p@outlook.com"},"_integrity":"sha512-Zn+81rk/p7BDDysdZhq55D2duC9nScPxhUOKZMFTkuTFZT9z+oHvKGfNyZajLAnXUII6qCUI+ZFfQ19TF9Y77g==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/dxcore"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 DXCore bindings for Bun (FFI) on Windows.","directories":{},"sideEffects":false,"_nodeVersion":"26.3.0","dependencies":{"@bun-win32/core":"2.0.0"},"_hasShrinkwrap":false,"devDependencies":{"@types/bun":"latest"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/dxcore_2.0.0_1782435304338_0.8586728939183075","host":"s3://npm-registry-packages-npm-production"}},"2.0.1":{"author":"Stev Peifer <stev.p@outlook.com>","bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"dependencies":{"@bun-win32/core":"2.0.1"},"description":"Zero-dependency, zero-overhead Win32 DXCore bindings for Bun (FFI) on Windows.","devDependencies":{"@types/bun":"latest"},"exports":{".":"./index.ts"},"license":"MIT","module":"index.ts","name":"@bun-win32/dxcore","peerDependencies":{"typescript":"^5"},"private":false,"homepage":"https://github.com/ObscuritySRL/bun-win32#readme","repository":{"type":"git","url":"git://github.com/ObscuritySRL/bun-win32.git","directory":"packages/dxcore"},"type":"module","version":"2.0.1","main":"./index.ts","keywords":["bun","ffi","win32","windows","dxcore","bindings","typescript","dll"],"sideEffects":false,"engines":{"bun":">=1.1.0"},"scripts":{"example:adapter-report":"bun ./example/adapter-report.ts","example:gpu-constellation":"bun ./example/gpu-constellation.ts"},"_id":"@bun-win32/dxcore@2.0.1","_integrity":"sha512-BI8dCUVIPbU0O+Re1WY363Zp/SvZEH7gFZt/Grhp2R3lloJweE9tQ/zjLkhT7OaMRw1vz3eK9mXQ2jWk35zflg==","_nodeVersion":"26.3.0","_npmVersion":"10.8.3","shasum":"035c232d6dd32dfbe67611e288e08a7f7e75f4c3","dist":{"integrity":"sha512-BI8dCUVIPbU0O+Re1WY363Zp/SvZEH7gFZt/Grhp2R3lloJweE9tQ/zjLkhT7OaMRw1vz3eK9mXQ2jWk35zflg==","shasum":"035c232d6dd32dfbe67611e288e08a7f7e75f4c3","tarball":"https://registry.npmjs.org/@bun-win32/dxcore/-/dxcore-2.0.1.tgz","fileCount":6,"unpackedSize":11679,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEYCIQDBgN7yijw04nnpdDSKLsR1NvOZG6kccplENCtNr40ZiAIhAMoZyjQSHT/rGbvlijYc2wq7NuJD/zF8Kuy16d0SR/hx"}]},"_npmUser":{"name":"obscuritysrl","email":"stev.p@outlook.com"},"directories":{},"maintainers":[{"name":"obscuritysrl","email":"stev.p@outlook.com"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/dxcore_2.0.1_1782437764986_0.6194878739631031"},"_hasShrinkwrap":false}},"time":{"created":"2026-05-18T04:11:50.977Z","modified":"2026-06-26T01:36:05.341Z","1.0.0":"2026-05-18T04:11:51.343Z","1.0.1":"2026-06-10T22:33:46.598Z","2.0.0":"2026-06-26T00:55:04.589Z","2.0.1":"2026-06-26T01:36:05.118Z"},"bugs":{"url":"https://github.com/ObscuritySRL/bun-win32/issues"},"author":"Stev Peifer <stev.p@outlook.com>","license":"MIT","homepage":"https://github.com/ObscuritySRL/bun-win32#readme","keywords":["bun","ffi","win32","windows","dxcore","bindings","typescript","dll"],"repository":{"type":"git","url":"git://github.com/ObscuritySRL/bun-win32.git","directory":"packages/dxcore"},"description":"Zero-dependency, zero-overhead Win32 DXCore bindings for Bun (FFI) on Windows.","maintainers":[{"name":"obscuritysrl","email":"stev.p@outlook.com"}],"readme":"# @bun-win32/dxcore\n\nZero-dependency, zero-overhead Win32 DXCore bindings for [Bun](https://bun.sh) on Windows.\n\n## Overview\n\n`@bun-win32/dxcore` exposes the `dxcore.dll` exports using [Bun](https://bun.sh)'s FFI. It provides a single class, `Dxcore`, which lazily binds native symbols on first use. You can optionally preload a subset or all symbols up-front via `Preload()`.\n\n`dxcore.dll` exports exactly one flat function, `DXCoreCreateAdapterFactory` (every other ordinal is a forwarder to `win32u`). It bootstraps the `IDXCoreAdapterFactory` COM object; all DXCore adapter enumeration — discrete GPUs, integrated parts, the software render driver, and headless compute-only MCDM devices — is reached through its COM vtable. The package ships the well-known IIDs, attribute GUIDs, and DXCore enums; the examples demonstrate the full vtable-walk pattern.\n\nThe bindings are strongly typed for a smooth DX in TypeScript.\n\n## Features\n\n- [Bun](https://bun.sh)-first ergonomics on Windows 10/11.\n- Direct FFI to `dxcore.dll` (DXGI-independent GPU/compute adapter enumeration, including MCDM).\n- In-source docs in `structs/Dxcore.ts` with links to Microsoft Docs.\n- Lazy binding on first call; optional eager preload (`Dxcore.Preload()`).\n- No wrapper overhead; calls map 1:1 to native APIs.\n- Strongly-typed Win32 aliases, IIDs, attribute GUIDs, and DXCore enums (see `types/Dxcore.ts`).\n\n## Requirements\n\n- [Bun](https://bun.sh) runtime\n- Windows 10 (version 1903+) or later\n\n## Installation\n\n```sh\nbun add @bun-win32/dxcore\n```\n\n## Quick Start\n\n```ts\nimport Dxcore, { IID_IDXCoreAdapterFactory } from '@bun-win32/dxcore';\n\n// IID_IDXCoreAdapterFactory laid out as a 16-byte little-endian GUID.\nfunction guid(text: string): Buffer {\n  const h = text.replace(/[{}-]/g, '');\n  const b = Buffer.alloc(16);\n  b.writeUInt32LE(parseInt(h.slice(0, 8), 16), 0);\n  b.writeUInt16LE(parseInt(h.slice(8, 12), 16), 4);\n  b.writeUInt16LE(parseInt(h.slice(12, 16), 16), 6);\n  for (let i = 0; i < 8; i += 1) b[8 + i] = parseInt(h.slice(16 + i * 2, 18 + i * 2), 16);\n  return b;\n}\n\nconst factory = Buffer.alloc(8);\nconst hr = Dxcore.DXCoreCreateAdapterFactory(guid(IID_IDXCoreAdapterFactory).ptr!, factory.ptr!);\n// hr === 0 (S_OK): factory.readBigUInt64LE(0) is the IDXCoreAdapterFactory pointer.\n// Walk its COM vtable to CreateAdapterList / GetAdapter — see example/.\n```\n\n> [!NOTE]\n> AI agents: see `AI.md` for the package binding contract and source-navigation guidance. It explains how to use the package without scanning the entire implementation.\n\n## Examples\n\nRun the included examples:\n\n```sh\nbun run example:gpu-constellation\nbun run example:adapter-report\n```\n\n- **gpu-constellation** — every GPU and compute adapter charted as a glowing terminal constellation with vendor-tinted silicon dies and animated VRAM bars, purely over the COM vtable.\n- **adapter-report** — an exhaustive per-adapter dossier: decoded hardware IDs, driver/WDDM versions, preemption granularity, every memory pool, and the full attribute matrix.\n\n## Notes\n\n- Either rely on lazy binding or call `Dxcore.Preload()`.\n- DXCore has no \"all adapters\" call — adapters are enumerated by attribute (`DXCORE_ADAPTER_ATTRIBUTE_D3D12_GRAPHICS`, `_D3D12_CORE_COMPUTE`, `_D3D11_GRAPHICS`).\n- Windows only. Bun runtime required.\n- **SAL types & naming:** nullability is in the **type** — `Optional<T>` (formally optional, SAL `_*opt_`) and `Nullable<T>` (plain `[in]`/`[out]` the docs say can be NULL), the null sentinel derived from `T` (`null` for pointers `LP*`/`P*`, `0n` for handles/by-value addresses); direction is in the **parameter name** — `_out` (`_Out_`), `_in_out` (`_Inout_`), `_In_` bare. See `AI.md` and the repo `AGENTS.md`.\n","readmeFilename":"README.md"}