Expand description
naga backend allowing you to translate shader code in any language supported by Naga
to Rust code.
The generated code requires the naga_rust_rt library.
Alternatively, you can use naga_rust_embed, which combines this library with
naga_rust_rt and provides convenient macros for embedding translated WGSL in your Rust code.
This library is in an early stage of development and many features do not work yet; this may be indicated by returned errors or by the generated code failing to compile. Broadly, simple mathematical functions will work, and bindings, textures, atomics, derivatives, and workgroup operations will not.
Re-exports§
pub use naga;
Structs§
- Config
- Configuration/builder for options for Rust code generation.
- Writer
nagabackend allowing you to translate shader code in any language supported by Naga to Rust code.
Enums§
- Error
- Errors returned by the Rust-generating backend.
Constants§
- CAPABILITIES
- The
Capabilitiessupported by our Rust runtime library.
Functions§
- write_
string - Converts
moduleto a string of Rust code.