Hacker News new | past | comments | ask | show | jobs | submit login

Ok, I committed some mild linker crimes and got the same program down to 800 bytes.

   rustc hello.rs -C panic=abort -C opt-level=3 -C link-args="/ENTRY:main /DEBUG:NONE /EMITPOGOPHASEINFO /EMITTOOLVERSIONINFO:NO /ALIGN:16"



Cool. That reminded me of this blog post[0], with Hello World Nim binary in just 150 bytes!

[0] - https://hookrace.net/blog/nim-binary-size/


Don't x64 binaries have to be 4k-aligned or something like that? I remember a video about runnable qr codes where this was a major point because they had to do trickery to make windows run binaries that were less than that.




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: