WESL Logo

#WESL - Enhanced WebGPU Shaders

Lightweight extensions to the WebGPU shading language.


Use standard extensions to enable WebGPU community tools for shader libraries, shader testing, web page examples, and more. WESL adds:

WESL integrates into existing toolchains (Vite, Webpack, build.rs) with a couple lines of config.

#Live Example

Recompile with a runtime condition See the JS linker output See the wesl-rs (WASM) output

#Why WESL?

#Tooling Ecosystem

WebGPU community tools rely on standard WESL extensions:

Tool Description
wgsl-test GPU shader testing with @test, CLI runner, vitest integration
wgsl-studio VS Code extension with test runner and shader preview
wgsl-play Web component for live shader rendering
wgsl-edit Web component shader editor with syntax highlighting and linting
wgsl-analyzer Language server for IDE support (forthcoming)

WESL linkers are available in both Rust (wesl crate) and JavaScript (wesl package), with bundler plugins for Vite, Webpack, Rollup, and more.

Linking is fast and WESL linkers are small (< 20kb), easy to embed in editor applications and other tools.

#Get Started

For other languages or unusual build setups, come talk to us.

Using a coding agent? Refer your agent to llms.txt for a concise description of using WESL.

#Get Involved

We discuss on Discord and on GitHub issues. Tell us about something that doesn’t work smoothly for you in WGSL/WESL? Maybe we can fix it with tools or language extensions.