npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2026 – Pkg Stats / Ryan Hefner

doe-gpu

v0.4.7

Published

Zig-first WebGPU runtime for Node.js, Bun, and Deno

Readme

doe-gpu

doe-gpu is the JavaScript entry point for Doe's native WebGPU runtime. It loads a native Doe library when one is available and fails explicitly when it is not.

Install

npm install doe-gpu

Package map

+-------------------+
| app code          |
| Node | Bun | Deno |
+---------+---------+
         |
         v
+--------------------------------+
| doe-gpu npm package            |
| JS API + native runtime loader |
+------+------------+------------+
       |            |
       v            v
+-------------+  +--------------------------------+
| entrypoints |  | native library resolution      |
| compute     |  | optional pkg | workspace build |
| native      |  | DOE_WEBGPU_LIB / DOE_LIB       |
| node-webgpu |  +---------------+----------------+
| plan        |                  |
| capture     |                  v
| browser     |          +----------------+
+------+------+          | libwebgpu_doe  |
      |                +-------+--------+
      |                        |
      |                        v
      |          +-------------------------------+
      |          | native backend path           |
      |          | Metal | Vulkan | D3D12/DXIL  |
      |          +---------------+---------------+
      |                          |
      +--------------------------+
                                 v
                      +---------------------+
                      | receipts or explicit|
                      | missing-runtime fail|
                      +---------------------+

+------------------+     +--------------------------+
| doe-gpu/browser  | --> | incumbent browser WebGPU |
+------------------+     +--------------------------+

+-------------------------------+
| Fawn/Chromium                 |
| separate browser release lane |
+-------------------------------+

Usage

Run the package examples:

node node_modules/doe-gpu/examples/node-first-kernel.mjs
bun node_modules/doe-gpu/examples/bun-first-kernel.mjs

Or call the default compute surface:

import { gpu } from "doe-gpu";

const device = await gpu.requestDevice();
const result = await device.compute({
  code: `@group(0) @binding(0) var<storage, read_write> data: array<f32>;
         @compute @workgroup_size(64) fn main(@builtin(global_invocation_id) id: vec3u) {
           data[id.x] = data[id.x] * 2.0;
         }`,
  inputs: [new Float32Array([1, 2, 3, 4])],
  output: { type: Float32Array, size: 16 },
  workgroups: 1,
});

Use createNativeDirect() when you want the native WebGPU provider directly:

import { createNativeDirect } from "doe-gpu";

const gpu = createNativeDirect();
const adapter = await gpu.requestAdapter();
const device = await adapter.requestDevice();

Entry Points

  • doe-gpu: default runtime surface
  • doe-gpu/compute: compute-focused helper surface
  • doe-gpu/native: explicit Zig-backed native WebGPU provider
  • doe-gpu/node-webgpu: Node WebGPU provider bootstrap
  • doe-gpu/api: provider-neutral helpers and types
  • doe-gpu/plan: JSON command-stream and execution-plan contracts
  • doe-gpu/capture: record-only WebGPU capture provider
  • doe-gpu/browser: browser API wrapper
  • doe-gpu/hybrid: compatibility helper for older integrations

Runtime requirements

  • Node.js 18+ for the default package entry point
  • Bun and Deno are supported through the package entrypoints in exports
  • a matching optional platform package, local workspace build, or explicit native library path

Native loading checks these paths:

  • npm-installed optional platform packages such as doe-gpu-darwin-arm64 and doe-gpu-linux-x64
  • a local workspace build under runtime/zig/zig-out/
  • explicit DOE_WEBGPU_LIB / DOE_LIB overrides
  • local debug prebuilds under packages/doe-gpu/prebuilds/<platform-arch>/

If the native addon or shared library is missing, the package fails explicitly instead of silently falling back to another runtime.

Evidence

The npm package is the JavaScript wrapper. It does not bundle the full Vulkan, Metal, Dawn-vs-Doe, browser, or hardware evidence trees.

Doe Metal and Vulkan evidence summary

Current public package and runtime evidence is indexed in reports/claim-index.json. The shared chart separates claim-indexed Apple Metal package/native rows, AMD Vulkan package/native/drop-in rows, and diagnostic ORT/browser rows. Read each row by its claim state:

  • claim-indexed: public claim row with a report path and claim sidecar.
  • diagnostic: measured engineering evidence, not public speed wording.
  • status-only: support or capability status without a performance claim.

Do not promote old package charts or local run artifacts unless the current claim index and gates still mark the lane as claimable.

Release boundary

A doe-gpu npm release is a package/native-runtime release. It is not, by itself, a Fawn/Chromium browser release and it does not prove that Doe replaces Dawn in every browser path.

Platform packages and prebuilds are platform-specific. macOS arm64, Linux x64, and future Windows artifacts need matching native libraries, package metadata, and evidence rows. Keep macOS evidence and downloads separate from Linux Vulkan browser diagnostics.

Browser runtime releases need their own public archive, SHA-256, proof surface, launch receipt, and Dawn-vs-Doe comparison receipts outside the npm package.

Browser boundary

doe-gpu/browser wraps the browser's incumbent WebGPU implementation. It is for API compatibility in browser code; it is not Doe replacing the browser runtime.

A future Fawn/Doe browser artifact for macOS arm64 should be documented as a separate browser release lane, not as doe-gpu/browser.

More detail

Legacy package names

These legacy package names are deprecated in favor of doe-gpu:

  • @simulatte/webgpu
  • @simulatte/webgpu-doe

License

Apache-2.0. See docs/licensing.md.