@vgpu/adapter-node
v0.0.5
Published
Node.js GPU adapter for vgpu, using Dawn-based WebGPU bindings.
Maintainers
Readme
@vgpu/adapter-node
0.0.1 — early preview
@vgpu/adapter-node connects vgpu to Node.js runtimes through Dawn-based WebGPU bindings. It exposes both a reusable adapter for App.create() and a convenience helper that creates a Device directly, making it the package to use for server-side rendering, CI image generation, and serverless deployments. This package depends on [email protected], and the release target includes linux-arm64 prebuilt support.
Install
pnpm add @vgpu/adapter-nodeExports
Runtime
createNodeAdaptercreateNodeDevice
Usage
import { createNodeDevice } from "@vgpu/adapter-node";
const device = await createNodeDevice({ backend: "webgpu" });
const texture = device.createTexture({
size: [64, 64],
format: "rgba8unorm",
usage: ["render_attachment", "copy_src"],
});
const bytes = await texture.read();
device.destroy();License
MIT.
