chore: Reduce binary sizes in desktop releases
Stripping symbols and enabling LTO makes the compiled artifacts smaller.
Desktop Linux shrinks from 40.4MB to 30.6MB.
- Related to https://github.com/ruffle-rs/ruffle/issues/19687
Don't we need them for stack traces in crash reports?
While on web, I can sort of see the point of trying to stay smaller, but on Desktop, and honestly, even in the browser extension, or on mobile, it should basically bear no weight IMHO, at least until we are not in the multi-hundred-MB territory (looks at electron apps).
If someone wants small: https://upx.github.io/
We also explicitly disabled stripping in wasm-opt to preserve symbols:
https://github.com/ruffle-rs/ruffle/blob/383497e2bf0099b1ed264701fbccb859a6502e7f/web/packages/core/tools/build_wasm.ts#L6
Don't we need them for stack traces in crash reports?
I believe setting panic = "abort" makes us skip stack traces, and testing shows that we don't include them on desktop.
While on web, I can sort of see the point of trying to stay smaller, but on Desktop, and honestly, even in the browser extension, or on mobile, it should basically bear no weight IMHO, at least until we are not in the multi-hundred-MB territory (looks at electron apps).
I made this PR was to test whether web works with symbols stripped, because I kinda suspected it will break wasm bindgen (which apparently is true). According to my understanding we have no reason to have symbols on desktop release.