ive seen http servers goto 500 bytes, my hello world is 2.5kb, is there anything else i can do to make it smaller? direct compiler flags? my build.zig is below.
Other people have tried to make a minimal executable in zig before. Check out Smallest Echo, Part 1: Zig
2 Likes
If you look at the resulting file, you’ll notice that there’s a lot of padding between the sections, and each section is aligned to a 0x200
byte boundary. I’m not super familiar with the PE/COFF format, but the file format itself is likely the limiting factor you’re dealing with here.
Some potentially relevant links:
1 Like