A WGSL shader minifier built as a WebAssembly module for WebGPU applications. Version 0.1.1, released as an alpha/pre-release. It runs in both browsers and Node.js, providing whitespace removal, identifier renaming, syntax optimization, and optional external binding mangling. The package ships TypeScript types and requires manual initialization of the WASM module before use. Unlike other WGSL tools, it offers fine-grained control over minification passes and supports browser bundlers like Vite and Webpack.
npm install wgslmin-wasmNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Initializes the WASM module, minifies a WGSL shader, and logs original vs minified output.
Call await initialize() at startup, before any minify() call.
Keep mangleExternalBindings: false (default) if you rely on binding names for reflection.
Provide wasmURL option pointing to the .wasm file location.
Use keepNames array to preserve critical identifiers.
N/A
Ensure await initialize() completes before any minify() call.
Reinstall package: npm install wgslmin-wasm@latest
Use named import: import { minify } from 'wgslmin-wasm'No dependency data recorded yet.