3 ms·
The actual code in the repo definitely compiles to less than 10k. The rest is bloat from linking CRT statically.
by musjleman 1y ago
The actual code in the repo definitely compiles to less than 10k. The rest is bloat from linking CRT statically.
- throwaway2037 1y agoAbove, someone shared this tip to compile down to 23,552 bytes. Ref: https://news.ycombinator.com/item?id=43957984 https://news.ycombinator.com/item?id=43957984 Can you share how you can compile to only 10kb?
- musjleman 1y agoBy "actual code" I meant the assembly that the application logic compiles down to, not the entire executable. But as far as the entire package goes, compiling it using clang with some flags I can get down to 19.5k without any effort. If I wanted to waste time on this, ripping out the CRT entirely and getting it to 16k would probably take less than an hour.