Function wgpu::naga::front::wgsl::parse_str

source ·
pub fn parse_str(source: &str) -> Result<Module, ParseError>
Available on (wgpu_core or naga) and crate feature wgsl-in only.
Expand description

This function may consume a lot of stack space. Compiler-enforced limits for parsing recursion exist; if shader compilation runs into them, it will return an error gracefully. However, on some build profiles and platforms, the default stack size for a thread may be exceeded before this limit is reached during parsing. Callers should ensure that there is enough stack space for this, particularly if calls to this method are exposed to user input.