How small can the Rust "Hello, World!" get on Windows?

225 points ozjd 61 comments

"Hello, World!" i686 executable (680 bytes)

I've been trying to reduce the default "Hello, World!" application in size without reducing compatibility.

I'm currently at 712 bytes for x86_64 and 680 bytes for i686.

The goal is to maintain compatibility with the original - It should be likely to work on Windows 12 (or whatever the next version is), and I have avoided optimisations that could cause issues (like /FIXED which would shave off another 56 bytes for i686 - why?, also avoiding things like OS specific syscalls)

The purpose is just for fun, but ultimately I'll probably fork it to create a cross architecture launcher (will bootstrap an x86/x64/arm64 exe)