pub fn do_optimization(
    dest_wasm: &OsStr,
    dest_optimized: &OsStr,
    optimization_level: &str,
    keep_debug_symbols: bool
) -> Result<()>
Expand description

Optimizes the Wasm supplied as crate_metadata.dest_wasm using the wasm-opt binary.

The supplied optimization_level denotes the number of optimization passes, resulting in potentially a lot of time spent optimizing.

If successful, the optimized Wasm is written to dest_optimized.