wgsl-rs is a new Rust procedural macro crate that lets developers write WGSL shaders using a subset of Rust syntax. Annotating a module with #[wgsl] keeps the code runnable on the CPU while transpiling it to WGSL for the GPU. It works on stable Rust with no custom compiler backend, no SPIR-V step, and no nightly toolchain. Compared to Rust-GPU, it trades features like generics, traits, and SPIR-V portability for dramatically simpler setup, testable shader logic on the CPU, compile-time WGSL validation via naga, and auto-generated wgpu boilerplate. The project is funded by NLnet and roadmapped for a 2026 beta release alongside GPU slab allocation and an ECS system.
Table of contents
Rust-GPU to Vectorware 🔗Worse is better? 🔗How it works 🔗What you get 🔗What you give up 🔗What's next 🔗1 Comment
Sort: