{"_id":"@bun-win32/dxgi","_rev":"4-6414ff43bf1146b888937463a47eff8b","name":"@bun-win32/dxgi","dist-tags":{"latest":"2.0.1"},"versions":{"1.0.0":{"name":"@bun-win32/dxgi","version":"1.0.0","keywords":["bun","ffi","win32","windows","dxgi","bindings","typescript","dll"],"author":"Stev Peifer <stev@bell.net>","license":"MIT","_id":"@bun-win32/dxgi@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":"8ff5d9fe49cff5edf79a6768649722d32e9add83","tarball":"https://registry.npmjs.org/@bun-win32/dxgi/-/dxgi-1.0.0.tgz","fileCount":6,"integrity":"sha512-k0jwBppR1Q9nmucXvQfwfDRXYQUEKMSmGO5fwIIPFeUJeie6OSGP6kTjTlh9gW8o/FMNFA7Esg497uciHmmdjg==","signatures":[{"sig":"MEUCIQDMU6/stw1mVTzM/+K4Z+U0/LjKNTh+pQJw9TiNrGXergIgGEc2qcyDjJ8Z4JCLL8KiGHyW4KIKU39aof0GDm3su1s=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":9843},"main":"./index.ts","type":"module","module":"index.ts","shasum":"8ff5d9fe49cff5edf79a6768649722d32e9add83","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:gpu-observatory":"bun ./example/gpu-observatory.ts","example:dxgi-factory-probe":"bun ./example/dxgi-factory-probe.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev@bell.net"},"_integrity":"sha512-k0jwBppR1Q9nmucXvQfwfDRXYQUEKMSmGO5fwIIPFeUJeie6OSGP6kTjTlh9gW8o/FMNFA7Esg497uciHmmdjg==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/dxgi"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 DXGI 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","@types/node":"^25.6.0"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/dxgi_1.0.0_1776867977610_0.899891681552716","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@bun-win32/dxgi","version":"1.0.1","keywords":["bun","ffi","win32","windows","dxgi","bindings","typescript","dll"],"author":"Stev Peifer <stev.p@outlook.com>","license":"MIT","_id":"@bun-win32/dxgi@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":"af501340840307928139bc4a0192ae7f58bbcdee","tarball":"https://registry.npmjs.org/@bun-win32/dxgi/-/dxgi-1.0.1.tgz","fileCount":6,"integrity":"sha512-MXV54eEnkmzDerBWW1GOsBc/+O1O/iSqdi4+rnstHbheZZrk+rhGrPv3uSUevYG3A8upqTa9wIxtayNCcIkhdw==","signatures":[{"sig":"MEUCIBFqOzj9TPNKzkr2MZKg1qo6Mb6gjnW0ElY2L2ZKH2A3AiEAup5Lfh4abMvlq0r9+j5jmBuJvO9006ZUXPt86FBAH5w=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":9848},"main":"./index.ts","type":"module","module":"index.ts","shasum":"af501340840307928139bc4a0192ae7f58bbcdee","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:gpu-observatory":"bun ./example/gpu-observatory.ts","example:dxgi-factory-probe":"bun ./example/dxgi-factory-probe.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev@bell.net"},"_integrity":"sha512-MXV54eEnkmzDerBWW1GOsBc/+O1O/iSqdi4+rnstHbheZZrk+rhGrPv3uSUevYG3A8upqTa9wIxtayNCcIkhdw==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/dxgi"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 DXGI 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","@types/node":"^25.6.0"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/dxgi_1.0.1_1781130827862_0.6831310463344038","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@bun-win32/dxgi","version":"2.0.0","keywords":["bun","ffi","win32","windows","dxgi","bindings","typescript","dll"],"author":"Stev Peifer <stev.p@outlook.com>","license":"MIT","_id":"@bun-win32/dxgi@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":"902b96491eefd8a02279d6a316af7f9e31d52627","tarball":"https://registry.npmjs.org/@bun-win32/dxgi/-/dxgi-2.0.0.tgz","fileCount":6,"integrity":"sha512-4IQ8VmCY2NWDDGh3P5vcALd7plCcc/Zd7RMdGnJysLPx5CpOYbxmX4rvneiYU/UgD7VRVHtuXAXDgRguL4t98A==","signatures":[{"sig":"MEQCIDmMXRvtDih0vehnF+9thT1F5yBoLoYYWRnv6S5YWhNyAiB0mZ+tKMEbT9wEAxSJ/HOxUdES2Ldmih6jE4G+sHDLFw==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":11114},"main":"./index.ts","type":"module","module":"index.ts","shasum":"902b96491eefd8a02279d6a316af7f9e31d52627","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:gpu-observatory":"bun ./example/gpu-observatory.ts","example:dxgi-factory-probe":"bun ./example/dxgi-factory-probe.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev.p@outlook.com"},"_integrity":"sha512-4IQ8VmCY2NWDDGh3P5vcALd7plCcc/Zd7RMdGnJysLPx5CpOYbxmX4rvneiYU/UgD7VRVHtuXAXDgRguL4t98A==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/dxgi"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 DXGI 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","@types/node":"^25.6.0"},"peerDependencies":{"typescript":"^5"},"_npmOperationalInternal":{"tmp":"tmp/dxgi_2.0.0_1782435305861_0.23674031532830808","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 DXGI bindings for Bun (FFI) on Windows.","devDependencies":{"@types/bun":"latest","@types/node":"^25.6.0"},"exports":{".":"./index.ts"},"license":"MIT","module":"index.ts","name":"@bun-win32/dxgi","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/dxgi"},"type":"module","version":"2.0.1","main":"./index.ts","keywords":["bun","ffi","win32","windows","dxgi","bindings","typescript","dll"],"sideEffects":false,"engines":{"bun":">=1.1.0"},"scripts":{"example:dxgi-factory-probe":"bun ./example/dxgi-factory-probe.ts","example:gpu-observatory":"bun ./example/gpu-observatory.ts"},"_id":"@bun-win32/dxgi@2.0.1","_integrity":"sha512-m8/BBPGPm7NLIEZG4KMAbDA+Anx36uEl8PkOxPh5K4SWDI/Z2ZaQjMDOy9uVBsEM+Oq0KqaJH7UCv6qeFrLa2g==","_nodeVersion":"26.3.0","_npmVersion":"10.8.3","shasum":"35c0f9b01588217008c831351ed83a5c5e4536f0","dist":{"integrity":"sha512-m8/BBPGPm7NLIEZG4KMAbDA+Anx36uEl8PkOxPh5K4SWDI/Z2ZaQjMDOy9uVBsEM+Oq0KqaJH7UCv6qeFrLa2g==","shasum":"35c0f9b01588217008c831351ed83a5c5e4536f0","tarball":"https://registry.npmjs.org/@bun-win32/dxgi/-/dxgi-2.0.1.tgz","fileCount":6,"unpackedSize":11114,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIFTg95tsuQH6eXxMBS4dHPUumCP07yjbpfWn3kxKg/fgAiBkheSobzjBghd86wm1Zo+j6lgog7EpuST19di9HXhJVg=="}]},"_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/dxgi_2.0.1_1782437766943_0.7848661078748442"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-22T14:26:17.456Z","modified":"2026-06-26T01:36:07.230Z","1.0.0":"2026-04-22T14:26:17.763Z","1.0.1":"2026-06-10T22:33:48.025Z","2.0.0":"2026-06-26T00:55:06.020Z","2.0.1":"2026-06-26T01:36:07.080Z"},"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","dxgi","bindings","typescript","dll"],"repository":{"type":"git","url":"git://github.com/ObscuritySRL/bun-win32.git","directory":"packages/dxgi"},"description":"Zero-dependency, zero-overhead Win32 DXGI bindings for Bun (FFI) on Windows.","maintainers":[{"name":"obscuritysrl","email":"stev.p@outlook.com"}],"readme":"# @bun-win32/dxgi\r\n\r\nZero-dependency, zero-overhead Win32 Dxgi bindings for [Bun](https://bun.sh) on Windows.\r\n\r\n## Overview\r\n\r\n`@bun-win32/dxgi` exposes the `dxgi.dll` exports using [Bun](https://bun.sh)'s FFI. It provides a single class, `Dxgi`, which lazily binds native symbols on first use. You can optionally preload a subset or all symbols up-front via `Preload()`.\r\n\r\nThe bindings are strongly typed for a smooth DX in TypeScript.\r\n\r\n## Features\r\n\r\n- [Bun](https://bun.sh)-first ergonomics on Windows 10/11.\r\n- Direct FFI to `dxgi.dll` (DirectX Graphics Infrastructure — adapter enumeration, factory creation, and the debug interface used by Direct3D 10/11/12).\r\n- In-source docs in `structs/Dxgi.ts` with links to Microsoft Docs.\r\n- Lazy binding on first call; optional eager preload (`Dxgi.Preload()`).\r\n- No wrapper overhead; calls map 1:1 to native APIs.\r\n- Strongly-typed Win32 aliases (see `types/Dxgi.ts`).\r\n\r\n## Requirements\r\n\r\n- [Bun](https://bun.sh) runtime\r\n- Windows 10 or later\r\n\r\n## Installation\r\n\r\n```sh\r\nbun add @bun-win32/dxgi\r\n```\r\n\r\n## Quick Start\r\n\r\n```ts\r\nimport Dxgi from '@bun-win32/dxgi';\r\n\r\n// IID_IDXGIFactory1 = 770aae78-f26f-4dba-a829-253c83d1b387\r\nconst iid = Buffer.from([\r\n  0x78, 0xae, 0x0a, 0x77, 0x6f, 0xf2, 0xba, 0x4d,\r\n  0xa8, 0x29, 0x25, 0x3c, 0x83, 0xd1, 0xb3, 0x87,\r\n]);\r\nconst ppFactory = Buffer.alloc(8);\r\n\r\nconst hr = Dxgi.CreateDXGIFactory1(iid.ptr, ppFactory.ptr);\r\nif (hr !== 0) throw new Error(`CreateDXGIFactory1 failed: 0x${(hr >>> 0).toString(16)}`);\r\n\r\nconst factoryAddress = ppFactory.readBigUInt64LE(0);\r\nconsole.log(`IDXGIFactory1 @ 0x${factoryAddress.toString(16)}`);\r\n// ... walk IDXGIFactory1::EnumAdapters1 / Release via the COM vtable.\r\n```\r\n\r\n> [!NOTE]\r\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.\r\n\r\n## Examples\r\n\r\nRun the included examples:\r\n\r\n```sh\r\n# GPU inventory dashboard (adapters, VRAM, vendor, outputs)\r\nbun run example:gpu-observatory\r\n\r\n# Factory / debug / adapter-removal compatibility matrix\r\nbun run example:dxgi-factory-probe\r\n```\r\n\r\n## Notes\r\n\r\n- Either rely on lazy binding or call `Dxgi.Preload()`.\r\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"}