Include optional wasm-opt execution in release builds
Running wasm-opt (from https://github.com/WebAssembly/binaryen) with option "-O2" on a generated wasm file build with the --release flag, shrinks the size of it quite significantly. In my case from ~2.6mb to ~1.9mb.
Would it be possible to, optionally, regarding the time overhead induced, include the execution of the wasm-opt tool in the build command, so that smaller and possibly more performant binaries can be generated by default?
Having a "as small as possible" wasm file should be desired in the web-landscape.
This is already possible. See https://trunkrs.dev/assets/#rust with data-wasm-opt
This issue is stale because it has been open 30 days with no activity. Remove stale label or comment or this will be closed in 5 days.