Skip to content

wgsl-tooling-wg/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: 2025-07

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.

About

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

Resources

License

Apache-2.0, MIT licenses found

Licenses found

Apache-2.0
LICENSE-APACHE
MIT
LICENSE-MIT

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Contributors 7

Languages