Open C0D3-M4513R opened 2 years ago
sierra uses naga to parse shaders. Naga is WGSL parser for wgpu project - one of the main WebGPU implementations.
WGSL is still rapidly evolving language. Last naga version published on crates.io uses old style attributes and thus sierra and arcana.
If you replace naga dependency from crates.io with its git repo HEAD then you can use new style attributes. That's what I do currently anyway.
According to the wgsl spec,
[[insert atttribute here]]
is not how attributes are specified. As such, thesierra::ShaderLanguage::WGSL
parser of this crate is technically not parsing wgsl. See here for wgsl specification: https://gpuweb.github.io/gpuweb/wgsl/#attributes