{"_id":"@bun-win32/d3d11","_rev":"4-80e39f1d0040e0b3c63d19a6069cfd2a","name":"@bun-win32/d3d11","dist-tags":{"latest":"2.0.1"},"versions":{"1.0.0":{"name":"@bun-win32/d3d11","version":"1.0.0","keywords":["bun","ffi","win32","windows","d3d11","bindings","typescript","dll"],"author":"Stev Peifer <stev@bell.net>","license":"MIT","_id":"@bun-win32/d3d11@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":"aa97edc69fda1e98c8fb007b291c26580cc30b80","tarball":"https://registry.npmjs.org/@bun-win32/d3d11/-/d3d11-1.0.0.tgz","fileCount":6,"integrity":"sha512-SBK5uqtaBMKF/PCc16H5Exv4MuvNvXxE2ltx0rCo7VcVY17yAJoPMpqgwz/U5nuKSeprlBAl5Na4wxqfeAwKaw==","signatures":[{"sig":"MEUCIE9wTmfZyCd00JYBj/cWEguJ0tZvb+8oCLn6zXOM8HE/AiEA7tbONOQlr+vJo+dqOhdd3I2uwWOLf5AOmyyWq6P+5Co=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13220},"main":"./index.ts","type":"module","module":"index.ts","shasum":"aa97edc69fda1e98c8fb007b291c26580cc30b80","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:d3d11-device-probe":"bun ./example/d3d11-device-probe.ts","example:d3d11-interop-probe":"bun ./example/d3d11-interop-probe.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev@bell.net"},"_integrity":"sha512-SBK5uqtaBMKF/PCc16H5Exv4MuvNvXxE2ltx0rCo7VcVY17yAJoPMpqgwz/U5nuKSeprlBAl5Na4wxqfeAwKaw==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/d3d11"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 D3D11 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/d3d11_1.0.0_1776867975362_0.3816075963777421","host":"s3://npm-registry-packages-npm-production"}},"1.0.1":{"name":"@bun-win32/d3d11","version":"1.0.1","keywords":["bun","ffi","win32","windows","d3d11","bindings","typescript","dll"],"author":"Stev Peifer <stev.p@outlook.com>","license":"MIT","_id":"@bun-win32/d3d11@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":"ecda220b1319673646651a1aa808cde1a325f0bc","tarball":"https://registry.npmjs.org/@bun-win32/d3d11/-/d3d11-1.0.1.tgz","fileCount":6,"integrity":"sha512-gGLzTVI822YaxXE7A9UFcQ7nNKDK8QUopqJQwD6GwoEhu7II3zMg1jIOTFdafE7HCfxTccSITX9+uA5NTNDFqQ==","signatures":[{"sig":"MEUCIGj/DRr7q53a67+76iDZgESZgRURv/GYAXKGewFWmlTeAiEAhH7PWdIT3yeDTwt/nyA2rmsxeZIYsLNYWgSBUP3Lf9M=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":13489},"main":"./index.ts","type":"module","module":"index.ts","shasum":"ecda220b1319673646651a1aa808cde1a325f0bc","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:d3d11-device-probe":"bun ./example/d3d11-device-probe.ts","example:d3d11-interop-probe":"bun ./example/d3d11-interop-probe.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev@bell.net"},"_integrity":"sha512-gGLzTVI822YaxXE7A9UFcQ7nNKDK8QUopqJQwD6GwoEhu7II3zMg1jIOTFdafE7HCfxTccSITX9+uA5NTNDFqQ==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/d3d11"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 D3D11 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/d3d11_1.0.1_1781130809394_0.50289571531033","host":"s3://npm-registry-packages-npm-production"}},"2.0.0":{"name":"@bun-win32/d3d11","version":"2.0.0","keywords":["bun","ffi","win32","windows","d3d11","bindings","typescript","dll"],"author":"Stev Peifer <stev.p@outlook.com>","license":"MIT","_id":"@bun-win32/d3d11@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":"57fb773fcc922cbb7880d1a15ccf85b7e4233018","tarball":"https://registry.npmjs.org/@bun-win32/d3d11/-/d3d11-2.0.0.tgz","fileCount":6,"integrity":"sha512-u3ZArX71+bBYMPRD+Rn71IoipT+s5ca9Rht1K7CBNnitqAKaDcHmdY3oJb//JzudKVrYOqluneHJ7+MOCKtI/w==","signatures":[{"sig":"MEQCIGT86B5jQIWX3A22BS0y6PJcWplFAAQ78GeZ+xUAr3ZgAiBXhDryco7tFltIQRMZYGxjPwKI4pD3xc1Q8SFjzd0VXQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":14796},"main":"./index.ts","type":"module","module":"index.ts","shasum":"57fb773fcc922cbb7880d1a15ccf85b7e4233018","engines":{"bun":">=1.1.0"},"exports":{".":"./index.ts"},"private":false,"scripts":{"example:d3d11-device-probe":"bun ./example/d3d11-device-probe.ts","example:d3d11-interop-probe":"bun ./example/d3d11-interop-probe.ts"},"_npmUser":{"name":"obscuritysrl","email":"stev.p@outlook.com"},"_integrity":"sha512-u3ZArX71+bBYMPRD+Rn71IoipT+s5ca9Rht1K7CBNnitqAKaDcHmdY3oJb//JzudKVrYOqluneHJ7+MOCKtI/w==","repository":{"url":"git://github.com/ObscuritySRL/bun-win32.git","type":"git","directory":"packages/d3d11"},"_npmVersion":"10.8.3","description":"Zero-dependency, zero-overhead Win32 D3D11 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/d3d11_2.0.0_1782435287880_0.7333728155515304","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 D3D11 bindings for Bun (FFI) on Windows.","devDependencies":{"@types/bun":"latest"},"exports":{".":"./index.ts"},"license":"MIT","module":"index.ts","name":"@bun-win32/d3d11","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/d3d11"},"type":"module","version":"2.0.1","main":"./index.ts","keywords":["bun","ffi","win32","windows","d3d11","bindings","typescript","dll"],"sideEffects":false,"engines":{"bun":">=1.1.0"},"scripts":{"example:d3d11-device-probe":"bun ./example/d3d11-device-probe.ts","example:d3d11-interop-probe":"bun ./example/d3d11-interop-probe.ts"},"_id":"@bun-win32/d3d11@2.0.1","_integrity":"sha512-BOzSdjJSeGcIAmt89oNXTKSfhaRxF2/nACGwFMvO1brmvthhkQMAiXK3tSfqwIMP6ruOt6grq1gCpRq9uSXXYA==","_nodeVersion":"26.3.0","_npmVersion":"10.8.3","shasum":"4c09517e08e3f5ce639d0fff41ff5a120391f9b2","dist":{"integrity":"sha512-BOzSdjJSeGcIAmt89oNXTKSfhaRxF2/nACGwFMvO1brmvthhkQMAiXK3tSfqwIMP6ruOt6grq1gCpRq9uSXXYA==","shasum":"4c09517e08e3f5ce639d0fff41ff5a120391f9b2","tarball":"https://registry.npmjs.org/@bun-win32/d3d11/-/d3d11-2.0.1.tgz","fileCount":6,"unpackedSize":14796,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEUCIEyN+rO/QGk1PtLBJpPblFxaD8xSkYjyZxWt2F4eaVTBAiEAxbVK9ydPevkMShu9tlN9zKZWi+aoc6UJ24fZiemfTUY="}]},"_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/d3d11_2.0.1_1782437745968_0.39623795614244295"},"_hasShrinkwrap":false}},"time":{"created":"2026-04-22T14:26:15.139Z","modified":"2026-06-26T01:35:46.228Z","1.0.0":"2026-04-22T14:26:15.521Z","1.0.1":"2026-06-10T22:33:29.534Z","2.0.0":"2026-06-26T00:54:48.024Z","2.0.1":"2026-06-26T01:35:46.099Z"},"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","d3d11","bindings","typescript","dll"],"repository":{"type":"git","url":"git://github.com/ObscuritySRL/bun-win32.git","directory":"packages/d3d11"},"description":"Zero-dependency, zero-overhead Win32 D3D11 bindings for Bun (FFI) on Windows.","maintainers":[{"name":"obscuritysrl","email":"stev.p@outlook.com"}],"readme":"# @bun-win32/d3d11\n\nZero-dependency, zero-overhead Win32 D3D11 bindings for [Bun](https://bun.sh) on Windows.\n\n## Overview\n\n`@bun-win32/d3d11` exposes the `d3d11.dll` exports using [Bun](https://bun.sh)'s FFI. It provides a single class, `D3d11`, which lazily binds native symbols on first use. You can optionally preload a subset or all symbols up-front via `Preload()`.\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 `d3d11.dll` (Direct3D 11 device / swap-chain creation, D3D11-on-12 interop, and WinRT `IDirect3DDevice` / `IDirect3DSurface` interop).\n- In-source docs in `structs/D3d11.ts` with links to Microsoft Docs.\n- Lazy binding on first call; optional eager preload (`D3d11.Preload()`).\n- No wrapper overhead; calls map 1:1 to native APIs.\n- Strongly-typed Win32 aliases (see `types/D3d11.ts`).\n\n## Requirements\n\n- [Bun](https://bun.sh) runtime\n- Windows 10 or later\n\n## Installation\n\n```sh\nbun add @bun-win32/d3d11\n```\n\n## Quick Start\n\n```ts\nimport D3d11, { D3D11_SDK_VERSION, D3D_DRIVER_TYPE } from '@bun-win32/d3d11';\n\nconst ppDevice = Buffer.alloc(8);\nconst pFeatureLevel = Buffer.alloc(4);\nconst ppContext = Buffer.alloc(8);\n\nconst hr = D3d11.D3D11CreateDevice(\n  null,\n  D3D_DRIVER_TYPE.D3D_DRIVER_TYPE_HARDWARE,\n  0n,\n  0,\n  null,\n  0,\n  D3D11_SDK_VERSION,\n  ppDevice.ptr,\n  pFeatureLevel.ptr,\n  ppContext.ptr,\n);\nif (hr !== 0) throw new Error(`D3D11CreateDevice failed: 0x${(hr >>> 0).toString(16)}`);\n\nconst deviceAddress = ppDevice.readBigUInt64LE(0);\nconst featureLevel = pFeatureLevel.readUInt32LE(0);\nconsole.log(`ID3D11Device @ 0x${deviceAddress.toString(16)}, FL 0x${featureLevel.toString(16)}`);\n// ... drive the device via its COM vtable and call Release when done.\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\n# Device-creation matrix (driver types × feature levels × flags)\nbun run example:d3d11-device-probe\n\n# Interop probe (WinRT IDirect3DDevice/IDirect3DSurface and D3D11-on-12)\nbun run example:d3d11-interop-probe\n```\n\n## Notes\n\n- Either rely on lazy binding or call `D3d11.Preload()`.\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"}