Strip custom sections in wasm-prune (#150)

* strip custom sections

* line width
This commit is contained in:
Nikolay Volf
2021-06-10 14:29:59 +03:00
committed by GitHub
parent 0cead7ba6d
commit 1ef05d71ed
+4
View File
@@ -330,6 +330,10 @@ pub fn optimize(
}
}
// Also drop all custom sections
module.sections_mut()
.retain(|section| if let elements::Section::Custom(_) = section { false } else { true });
Ok(())
}