It's too broad to ask about every single build result of zig library. If you narrow it down to simply "why 100 Bytes of C++ hello world produces 20 kB executable", then it's because C++ runtime and
iostream
itself are already complex enough. Try to
objdump -d hello > hello.asm
, on my Ubuntu it already produces 150 lines of assembler code.
Related topic from SW engineering. Then the same question can be asked about every file in your build tree. —
pptaszni 10 secs ago