pub fn module_to_source(
module: &naga::Module,
) -> Result<String, naga::back::wgsl::Error> {
#[allow(unused_mut)]
let mut module = module.clone();
#[cfg(feature = "minify")]
{
}
let info = naga::valid::Validator::new(
naga::valid::ValidationFlags::all(),
naga::valid::Capabilities::all(),
)
.validate(&module);
let info = info.unwrap();
let src = naga::back::wgsl::write_string(
&module,
&info,
naga::back::wgsl::WriterFlags::empty(),
)?;
#[cfg(feature = "minify")]
{
}
Ok(src)
}