A WGSL (WebGPU Shading Language) minifier written in Rust, compiled to WebAssembly for use in Node.js and browsers. Current stable version is 1.0.3, with frequent updates. It reduces WGSL shader size by removing comments, whitespace, and renaming variables. Key differentiators: Rust-based performance, TypeScript support, and works both in Node.js and browser environments via WebAssembly.
npm install minwgslNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Minifies a simple WGSL vertex shader using all available options.
Set renameIdentifiers to false in options if you need to preserve original names.
Validate WGSL before minification using a WGSL parser.
Use a bundler like Webpack or Vite, or load the WASM manually with @webassemblyjs.
Run 'npm install minwgsl' and ensure your project uses ESM (set type: module in package.json or use .mjs file).
Use 'import { minify } from 'minwgsl'' instead of 'import minwgsl from 'minwgsl''.Ensure you have imported minify correctly and call it with the WGSL string and options object.
No dependency data recorded yet.