upvote
fwiw, here's 3code which is 1.6MiB written in Nim - https://3code.capocasa.dev/
reply
I was looking it last night and the repo is something like 600k lines of Zig. Maybe 500k after comments and blank lines.

In my own experiments to build a tiny zig agent it came out to under 800kb.

reply
I think the problem is that when you use agents to write Zig it will bruteforce code, because there isn't that much good reference code to work off of.
reply
So large? Really? Allow me to introduce you to electron.
reply
Yes, large. I haven't used Zig much myself, but from a few experiments I ran, Zig handles dead code elimination exceptionally well. It compiled a full Win32 GUI calc app that used Capy (a full, cross-platform GUI framework) into a 133kb executable. Removing Capy completely and using Win32 APIs directly produced an even smaller (93kb) binary (it also removed some DLL dependencies, leaving basically only ntdll.dll). For the same task, Rust + Slint produced a 4.7 MB binary that still depended on multiple (non-Windows-provided) shared libraries.

Given another commenter's mention of a similar project written in Nim that yielded a 1.6 MB binary, my first guess is that the 6 MB Zig binary simply isn't optimized for size - it might be a debug build. If not that, then I'm not sure what's happening, but yeah, in the context of Zig, 6mb for a CLI app is a bit strange.

reply
Those of us educated in 70's and 80's home computing have several nice words for stuff like Electron.
reply