A WGSL bundler and minifier for WebGPU shaders. Current stable version 0.1.0. Early-stage package with TypeScript support. Designed to bundle and minify WGSL code for WebGPU applications. Differentiators include native performance via Rust-based build (napi-rs) and simple API. Ships type definitions. Requires Node >=12.
npm install wgslinkNo compatibility data collected yet for this library.
Verified import paths — ran on the pinned version, not inferred.
Shows how to bundle and minify WGSL shader code using async functions.
Use await or .then() to handle Promises.
Ensure your platform is supported and has the necessary build tools for native modules.
Pin version to prevent unexpected breaking changes.
Install package: npm install wgslink. Ensure project is configured for ESM (type: module in package.json) or use require().
Use import { bundle } from 'wgslink' or const { bundle } = require('wgslink').Reinstall package or rebuild native module: npm rebuild wgslink.