SwayOSD icon indicating copy to clipboard operation
SwayOSD copied to clipboard

Reducing Binary Size

Open SturgeonInc opened this issue 8 months ago • 2 comments

Is there any way the size of the binaries could be reduced?

Image

At the moment the three components' binaries reach almost 300 MiB which feels insane

SturgeonInc avatar Apr 17 '25 23:04 SturgeonInc

Mine builds only to 12.7MB for all 3 binaries, perhaps this is an issue with how it is being packaged on your distro? 300MB is very similar to when I build in debug, so your binaries will also be performing drastically worse if that is what has happened here.

Though with these added to the Cargo.toml the size reduces by 40% to 7.8MB so I think it would be worth adding this @ErikReider [profile.release] strip = true lto = true

CodedNil avatar Jul 07 '25 08:07 CodedNil

Though with these added to the Cargo.toml the size reduces by 40% to 7.8MB so I think it would be worth adding this @ErikReider [profile.release] strip = true lto = true

Oh cool! I didn't know that you could do that. I'm on it

ErikReider avatar Jul 07 '25 08:07 ErikReider