@kirknock/node-openxr-dawn
v0.3.2
Published
Patched dawn.node for Linux x64 (glibc): WebGPU rendering into OpenXR swapchain images. Built by scripts/build-dawn-node.sh.
Maintainers
Readme
@kirknock/node-openxr-dawn
A patched Dawn dawn.node (Linux x64,
glibc) that renders WebGPU straight into OpenXR swapchain images, with no
copies. The Vulkan backend can create its instance and device through
XR_KHR_vulkan_enable2. It can also wrap OpenXR swapchain VkImages as
WebGPU textures.
npm install @kirknock/node-openxr-dawnconst dawn = require('@kirknock/node-openxr-dawn'); // { create, globals, xr }Requirements
- Linux x64 with glibc 2.38 or later (Ubuntu 24.04, Debian 13, Fedora 39 or newer)
- A Vulkan driver and loader (
libvulkan.so.1), which are loaded at runtime - Node.js 18 or later. The addon uses Node-API, so one binary works with every Node version.
Building
npm run build # scripts/build-dawn-node.sh: toolchain, Dawn sources and build in out/
npm run smoke # loads ./dawn.node and checks its exportsThe script downloads pinned CMake and Go into out/toolchain, fetches Dawn at
the commit in third_party/dawn/COMMIT, applies third_party/dawn/patches/
and builds dawn.node into the package root. You need git, python3,
curl, ninja and a C++20 compiler (GCC 13 is tested). DAWN_JOBS sets the
build parallelism (default 4; one translation unit can take more than 1 GB).
third_party/dawn/dawn-node.map exports only the Node-API entry points. Node
exports its own Abseil, so if this addon exported Abseil too, Dawn would end
up running Node's copy.
Releases
GitHub Actions builds every push and pull request (.github/workflows/ci.yml).
To publish a release, push a tag v<version> that matches package.json:
npm version patch # bumps package.json, commits and tags
git push --follow-tags.github/workflows/release.yml builds the binary and publishes it to npm
through trusted publishing (OIDC, with provenance). It also attaches the binary
to a GitHub Release.
License
The patches and scripts are BSD-3-Clause (LICENSE). The published binary
contains Dawn, whose license ships as LICENSE.dawn, and the libraries Dawn
statically links.
