Registry / other / naga
library29.0.3rscratesunverified

Shader translator and validator. Part of the wgpu project

# Cargo.toml [dependencies] naga = "29.0.3"
INSTALL
IMPORT
SIG · NAGA
N
naga
otherrustv29.0.3
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Parser
use naga::front::wgsl::Parser;

Parse a WGSL shader using naga

use naga::front::wgsl::Parser; fn main() -> Result<(), Box<dyn std::error::Error>> { let source = "@vertex fn main() -> @builtin(position) vec4<f32> { return vec4<f32>(0.0, 0.0, 0.0, 1.0); }"; let mut parser = Parser::new(); let module = parser.parse(source)?; println!("Parsed {} functions", module.functions.len()); Ok(()) }
Debug
Known issues
gotchaRequires feature flags for specific shader formats (e.g., `wgsl-in`, `spv-out`)
fix
Enable features like `wgsl-in` and `spv-out` in Cargo.toml
affects: >=0.10.0
Upgrade
Version history
29.0.3latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
naga — cargo add naga · libregistry