WESL is Lightweight extensions to the WebGPU shading language; it adds imports and conditional compilation. WESL is supported by wgsl-analyzer, the only WGSL LSP I know of.
While I understand Motion GPU provides adequate shader compile guardrails, #include <package> isn't supported by wgsl-analyzer, and I don't think having your IDE not screaming at you with errors would be an excessive ask, and it would replace (or at least be an alternative to) Motion GPU's standalone implementation of packages (#include <package> ), which isn't community standard (as far as I'm aware - please correct me if I'm wrong).
Example of my IDE not being a fan of Motion GPU's #include
Using [wgsl-wesl-zed](https://github.com/lucascompython/wgsl-wesl-zed), which is built on top of wgsl-analyzer. wgsl-analyzer also has a [VSCode extension](https://wgsl-analyzer.github.io/book/vs_code.html).
The code runs fine.
And notably: Most WESL enhancements are intended as proposals for future versions of W3C standard WGSL.
Outside of community standards and LSP, WESL's conditional compilation is real feature that can be useful for end users.
Was WESL support considered in the past? Could it be now? I think it'd be a great add.
Useful links
WESL: JavaScript Runtime Linking
WESL: JavaScript Builds
wesl-js
WESL is Lightweight extensions to the WebGPU shading language; it adds imports and conditional compilation. WESL is supported by wgsl-analyzer, the only WGSL LSP I know of.
While I understand Motion GPU provides adequate shader compile guardrails,
#include <package>isn't supported by wgsl-analyzer, and I don't think having your IDE not screaming at you with errors would be an excessive ask, and it would replace (or at least be an alternative to) Motion GPU's standalone implementation of packages (#include <package>), which isn't community standard (as far as I'm aware - please correct me if I'm wrong).Example of my IDE not being a fan of Motion GPU's #include
The code runs fine.
And notably: Most WESL enhancements are intended as proposals for future versions of W3C standard WGSL.
Outside of community standards and LSP, WESL's conditional compilation is real feature that can be useful for end users.
Was WESL support considered in the past? Could it be now? I think it'd be a great add.
Useful links
WESL: JavaScript Runtime Linking
WESL: JavaScript Builds
wesl-js