WESL shader language support
  • WGSL 65.2%
  • Rust 34.5%
  • C 0.3%
Find a file
Repository files (latest commit first)
Filename Latest commit message Latest commit date
2026-03-27 11:00:31 +01:00
.github CI: install cargo-udeps from GitGub Releases 2025-09-20 22:30:56 +02:00
crates comment fix (#195) 2026-03-27 11:00:31 +01:00
examples update Cargo.toml files 2025-12-07 22:31:39 +01:00
samples Update tests and sample to immediates 2025-12-31 12:01:19 +02:00
.editorconfig taplo fmt 2025-04-12 12:41:46 +02:00
.gitattributes fix CRLF and add .gitattributes (thx @BenjaminBrienen) 2025-04-11 11:49:00 +02:00
.gitignore minor 2025-05-30 22:25:36 +02:00
.gitmodules Update git submodule 2025-07-11 12:48:05 +02:00
.markdownlint.jsonc add wgpu test files 2025-09-14 22:21:17 +02:00
Cargo.lock Feat/wesl-toml (#185) 2026-03-21 23:46:06 +01:00
Cargo.toml patch bump v0.3.2 2025-12-27 22:41:15 +01:00
CONTRIBUTING.md update CONTRIBUTING.md 2025-04-12 12:54:57 +02:00
COPYRIGHT dual license MIT/Apache2 2025-02-06 12:56:02 -08:00
deny.toml Switch to tombi 2025-09-02 11:38:02 +02:00
LICENSE-APACHE dual license MIT/Apache2 2025-02-06 12:56:02 -08:00
LICENSE-MIT dual license MIT/Apache2 2025-02-06 12:56:02 -08:00
README.md update documentation and fix docsrs error 2025-12-09 21:26:00 +01:00
rustfmt.toml no inline if 2025-04-12 12:59:19 +02:00
tombi.toml Re-order keys in dependencies 2025-09-10 12:38:40 +02:00
typos.toml Switch to tombi 2025-09-02 11:38:02 +02:00

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.