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

Interestingly, I can't seem to get an empty nim programme below 32k.

   #> touch foo.nim
   #> nim c -d:release --opt:size -d:strip -d:danger foo.nim
   #> ls -lhs foo | cut -d\  -f1
   32K



With --os:standalone and panicoverride.nim it goes down to 15k

And down to *150 bytes* with some hacks https://hookrace.net/blog/nim-binary-size/


Very handy! Thank-you.


Same with Swift (on Mac)

    % touch foo.swift
    % swiftc -Osize -Xlinker -x foo.swift
    % ls -lh foo | cut -d' ' -f10
    33K
    % strip foo
    % ls -lh foo | cut -d' ' -f10
    33K




Consider applying for YC's Spring batch! Applications are open till Feb 11.

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

Search: