Size of hello world executable is three times bigger in ubuntu than in windows

Hi all,

I am playing around with rust 1.15.1.
I have a c9 instance with ubuntu trusty.
I took the code from
I ran rustc -O

and got a hello executable of 3.4 Mb.

Is this normal?

In windows i got one with 1 Mb


There is a deep rathole that you can go down regarding binary sizes of rustc-compiled files, so I will give you a short version

oh..and the deep end is


cool :slight_smile:

This sounds like something that may have been fixed by - you might want to try building with a nightly compiler on Linux and see how things look there.

For your Windows version, were you using the pc-windows-gnu toolchain? If you used pc-windows-msvc your hello world binary would be only 108KiB.