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

C# can create single-binary executables, even without native AOT.



They are still going to significant bigger than the equivalent golang binary because of the huge .NET runtime, no?



Is this a fair comparison, won't doing anything more significant than `print` in C# require a .NET framework to be installed (200MB+)?


No. This is normal native compilation mode. As you reference more features from either the standard library or the dependencies, the size of the binary will grow (sometimes marginally, sometimes substantially if you are heavily using struct generics with virtual members), but on average it should be more scalable than Go’s compilation model. Even JIT-based single-file binaries, with trimming, take about ~13-40 MB depending on the task. The runtime itself AFAIK, if installed separately, is below 100MB (installing full SDK takes more space, which is a given).


Spending ages slamming your head on your keyboard because you get a dll error or similar running a .NET app and just can't find the correct runtime version / download is a great past time.

then when you find the correct version but you then have to install both the x86 and x64 version because the first one you installed doesn't work

yeh, great ecosystem

at least a Go binary runs 99.99999% of the time when you start it.


Since this is just Hello World, then TinyGo: 644kB


Yeah and I doubt many people care if the TS compiler is 200MB anyway LOL. It's 2025.


Depends on how well trimming works. It's probably still larger than Go even with trimming, but Go also has a runtime and won't produce tiny binaries.




Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

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

Search: