miniray

JSON →
library 0.3.1 ·javascript
verified Jun 4, 2026

A WGSL minifier for WebGPU shaders, distributed as a WebAssembly build for browsers and Node.js (v0.3.x, monthly releases). Unlike general JS minifiers, it specializes in WGSL: it understands shader syntax, can tree-shake unused declarations, rename identifiers, optimize syntax, and optionally mangle external bindings. Ships TypeScript definitions and supports source maps via source-map crate. Relies on an async WASM initialization step that is a common footgun.