WebGPU has been the web’s most frustrating gift: real GPU access, wrapped in enough adapter negotiation and binding boilerplate to bury a frontend team. Vercel dealt with that pain internally while building the shaders on vercel.com, and now the company has released the result as vgpu, an MIT-licensed TypeScript library on npm. The pitch is straightforward: .wgsl files become importable modules, one Gpu context handles everything, and the identical shader runs in a browser canvas, headless Node.js, or a CI snapshot test without changing a line of shader code.

The library’s module system is where it earns attention. Instead of hand-writing bind group layouts that inevitably drift out of sync, vgpu resolves the module graph, reflects bindings, strips unused declarations, and emits compact shader source at build time. The README claims a complete fullscreen effect ships in 25 KB gzipped, with CI enforcing that budget. The quick start is genuinely four lines: init, bind a surface, compile an effect, and start a frame loop. Uniforms are addressed by their WGSL names through set(), which eliminates an entire class of glue code.

For testing, vgpu ships three runtimes. The browser path is obvious. The Node path is Dawn-backed and renders offscreen — you create a target, call read(), and get pixels back. That’s what makes CI rendering practical; pixelmatch and pngjs are direct dependencies of the published package, so snapshot comparison works out of the box. A deterministic mock adapter exists for tests that should never touch a GPU. No hosted service, no account, no quota. pnpm add vgpu is the entire acquisition path.

Vercel calls this an agent-first library, and the packaging backs that up unusually well. There’s a vgpu binary for npx commands, an agents.md file, llms.txt, a full documentation export, a tokenless examples discovery API with an OpenAPI 3.1 spec, and even a hosted read-only MCP server at vgpu.sh/api/mcp. That’s a different bet than most shader libraries make — it treats AI coding assistants as first-class users, not an afterthought. Whether that bet pays off depends on whether agents can meaningfully help developers iterate on WGSL, which has historically been a very human debugging process. The infrastructure is there; the workflow question remains open.