3 ms·
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
by dleslie 5y ago
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
- b3morales 5y agoSame 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
- goodpoint 5y agoWith --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/ https://hookrace.net/blog/nim-binary-size/
- dleslie 5y agoVery handy! Thank-you.