Skip to content

Support for WESL #6

@glypse

Description

@glypse

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 Image 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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions