[package]
name = "naga"
version.workspace = true
authors.workspace = true
edition.workspace = true
description = "Shader translator and validator. Part of the wgpu project"
repository.workspace = true
keywords = ["shader", "SPIR-V", "GLSL", "MSL"]
license.workspace = true
exclude = ["bin/**/*", "tests/**/*", "Cargo.lock", "target/**/*"]
rust-version = "1.82.0"
[package.metadata.docs.rs]
all-features = true
[features]
default = []
dot-out = []
glsl-in = ["dep:pp-rs"]
glsl-out = []
msl-out = []
msl-out-if-target-apple = []
serialize = [
"dep:serde",
"bitflags/serde",
"half/serde",
"hashbrown/serde",
"indexmap/serde",
]
deserialize = [
"dep:serde",
"bitflags/serde",
"half/serde",
"hashbrown/serde",
"indexmap/serde",
]
arbitrary = [
"dep:arbitrary",
"bitflags/arbitrary",
"indexmap/arbitrary",
"half/arbitrary",
"half/std",
]
spv-in = ["dep:petgraph", "petgraph/graphmap", "dep:spirv"]
spv-out = ["dep:spirv"]
wgsl-in = ["dep:hexf-parse", "dep:unicode-ident"]
wgsl-out = []
hlsl-out = []
hlsl-out-if-target-windows = []
termcolor = ["codespan-reporting/termcolor"]
stderr = ["codespan-reporting/std"]
fs = []
[dependencies]
arbitrary = { workspace = true, features = ["derive"], optional = true }
arrayvec.workspace = true
bitflags.workspace = true
bit-set.workspace = true
cfg-if.workspace = true
codespan-reporting = { workspace = true }
hashbrown.workspace = true
half = { workspace = true, features = ["num-traits"] }
rustc-hash.workspace = true
indexmap.workspace = true
libm = { workspace = true, default-features = false }
log.workspace = true
num-traits.workspace = true
once_cell = { workspace = true, features = ["alloc", "race"] }
spirv = { workspace = true, optional = true }
thiserror.workspace = true
serde = { workspace = true, features = ["alloc", "derive"], optional = true }
petgraph = { workspace = true, optional = true }
pp-rs = { workspace = true, optional = true }
hexf-parse = { workspace = true, optional = true }
unicode-ident = { workspace = true, optional = true }
[build-dependencies]
cfg_aliases.workspace = true
[dev-dependencies]
diff.workspace = true
env_logger.workspace = true
hashbrown = { workspace = true, features = ["serde"] }
hlsl-snapshots.workspace = true
itertools.workspace = true
naga-test.workspace = true
ron.workspace = true
rspirv.workspace = true
spirv.workspace = true
serde = { workspace = true, features = ["default", "derive"] }
strum = { workspace = true }
walkdir.workspace = true
[lints.clippy]
std_instead_of_alloc = "warn"
std_instead_of_core = "warn"
alloc_instead_of_core = "warn"