8 unstable releases (3 breaking)
0.4.1 | Mar 11, 2024 |
---|---|
0.4.0 | Feb 28, 2024 |
0.3.2 | Nov 20, 2023 |
0.2.0 | Nov 2, 2023 |
0.1.2 | Aug 2, 2023 |
#1082 in Game dev
66 downloads per month
Used in 3 crates
(via naga-to-tokenstream)
16KB
308 lines
WGSL Minifier
A small tool built on top of Naga that makes WGSL shaders smaller by performing simple dead code elimination, stripping names of non-exported functions and local variables, and removing as much whitespace as possible.
Usage
To minify your WGSL shader, simply run the following:
cargo install wgsl-minifier
wgsl-minifier path/to/your/shader.wgsl path/to/minified/output.wgsl
Dependencies
~5–15MB
~166K SLoC