Binary is way bigger on linux than on macOS


I have noticed that binaries on linux (fedora & ubuntu) resulted from cargo build --release is way bigger than them on macOS. for example compiling this package on linux results in 4.8M but on my macOS it’s just 1.4M.

Is there a reason for this to happen, and how can I achieve that small size binary on linux?


Try to strip it.

This is a known issue