A community-driven superset of WGSL adding module imports, conditional compilation, and packaging for WebGPU shaders.
WESL is a community-standard superset of the WebGPU Shading Language (WGSL) that adds enhancements like module imports, conditional compilation, and packaging support. It solves the problem of fragmented, project-specific WGSL tooling by providing a shared set of definitions that enable reusable shader libraries and better development workflows.
Graphics and GPU compute developers working with WebGPU who need better code organization, conditional shader logic, and reusable shader components across projects.
Developers choose WESL because it offers practical, community-vetted enhancements to WGSL that are immediately useful, while maintaining full compatibility with WebGPU engines and serving as a testing ground for future WGSL standard proposals.
A portable and modular superset of WGSL
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
WESL introduces import statements to split shaders across multiple files, improving maintainability for complex projects as outlined in the Imports spec draft.
With @if statements for conditional translation, shaders can be tailored at compile time based on external flags, enabling platform-specific optimizations.
Packaging support via npm and crates.io fosters reusable shader libraries, reducing duplication and encouraging community collaboration.
All enhancements are transpiled to vanilla WGSL, ensuring compatibility with existing WebGPU engines like Dawn and wgpu without engine modifications.
WESL requires an extra compilation step to convert to standard WGSL, adding complexity and potential delays in build processes.
As a community-driven project, tooling and IDE support are less developed compared to established languages, risking integration challenges.
With experimental enhancements and community iteration, stabilized features might still evolve, causing compatibility issues for early adopters.