Closed robinthunstrom closed 3 years ago
winres.a
is statically linked, so there is obviously some overhead.
winres does not link code into binary. The static library is a necessity to link the icon (and other resources) into the executable. The static library (which should be called resource.lib
but is a .ar
archive) in actuality is the output of the rc.exe
resource compiler usually with the suffix .res
, but since we need the rust compiler to link it a library suffix is needed.
Back to the OP's comment the t the binary size increases. This must obviously be the case as now the binary contains in itself the icon and other resources like the version string information. If you use a particularly large icon (like 512px) then the binary size may increase by more than 1MB. (pictures need size). I'm not sure what OP originally expected but if you add content to a file its size will always increase.
So I'm closing this as invalid.
Hi!
I added this crate as dependency to add an icon to my project and expected this to have zero effect on the final binary size. To my surprise was the binary size increased. Is this expected or not?
This is how my toml looks like...