Mirror of space-wizards/wesl-rs
Find a file
Mathis Brossier aabb675c5a
Merge pull request #148 from wgsl-tooling-wg/fix-147
use raw idents in codegen
2025-09-29 20:57:32 +02:00
.github CI: install cargo-udeps from GitGub Releases 2025-09-20 22:30:56 +02:00
crates use raw idents in codegen 2025-09-29 17:50:30 +02:00
examples Merge pull request #140 from wgsl-tooling-wg/packager-fixes 2025-09-26 23:18:53 +02:00
samples rm samples/test.wesl 2025-08-31 13:55:30 +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 pkg codegen inline root module into top level 2025-09-20 22:05:45 +02:00
Cargo.toml Re-order keys in dependencies 2025-09-10 12:38:40 +02: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 ignore markdownlint complaint in readme 2025-07-28 00:18:20 +02: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.