Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

> and lives as a 35 MB binary when installed ... it's made up of 7,600 lines of Rust

Wow; how on earth can this blow up to 35 MB? For comparison: the Crossline stand-allone exe (http://software.rochus-keller.info/CrossLine_win32.zip) with built-in https://github.com/rochus-keller/Fts and Sqlite (all written in C/C++) is less than 7 MB. Where do the other ~30 MB come from?



Rust uses static linking (by default). So everything and the kitchen sink is compiled in.

https://stackoverflow.com/a/29008355


Binaries should also be stripped before comparing file size.


That might be an explanation for the huge size; unfortunately we don't know whether the author used a stripped version or not.


Apparently stripped binaries aren't the common experience, so I don't see why they should be used for comparison.


Debug info size depends on the language and the compiler. Binary packages installed via package managers are also typically stripped. There are too many confounding variables, simply running `strip foo` before comparing evens the playing field.


The same applies to my example; the exe includes a statically linked version of Qt as well as all the other stuff mentioned. So the question remains.




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

Search: