dorkhub

wesl-rs

wesl-rs: a compiler for WESL (WGSL Extended) shaders.

webgpu-tools
WGSL12331 forksupdated 1 day ago
visit the demogit clone https://github.com/webgpu-tools/wesl-rs.gitwebgpu-tools/wesl-rs

WESL logo


documentation web site wesl discord crates.io wesl crate docs.rs wesl crate

wesl-rs implements the necessary tools to build complex WGSL shaders, like what naga_oil does for Bevy, but in a framework-agnostic way. Visit wesl-lang.dev to learn more about WGSL shader tools and language extensions.

Usage

Read the WESL for Rust tutorial and refer to the main crate documentation. Try out WESL and its implementations, wesl-js and wesl-rs on the playground.

Status

Note

last update: 2026-05

WESL 0.2 was released and supports the following features:

  • Import statements & inline import paths
  • Conditional compilation with @if, @elif, @else attributes
  • Cargo shader packages

The following features are experimental:

  • Evaluation and Execution of WGSL code
  • Lowering of const-expressions, code normalization
  • Code validation

The following features are planned (to be designed with the WESL team):

  • Automatic bindings, structs of bindings
  • Namespaces / inline modules
  • Generic functions

Contributing

Contributions are welcome. Please join the discord to get in touch with the community. Read CONTRIBUTING.md before submitting Pull Requests.

License

Except where noted (below and/or in individual files), all code in this repository is dual-licensed under either:

at your option.

Your contributions

Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.

more like this

anne-key

Firmware for Anne Pro Keyboard written in Rust

Rust572

TachiSnap

TachiSnap — Pixel Snapper for animation pixel artists. Rust + WebAssembly client-side tool for cleaning up AI-generated…

HTML50

urge

The Universal Ruby Game Engine (URGE) Project

C++50

bit_gossip

Pathfinding library for calculating all node pairs' shortest paths in an unweighted undirected graph.

Rust50

search

search projects, people, and tags