3 ms·
C# is fine. But last I checked, the AOT compilation generates a bunch of .dll files, which are not suitable for a CLI program like Go's zero dependencies binary
by typ 2y ago
C# is fine. But last I checked, the AOT compilation generates a bunch of .dll files, which are not suitable for a CLI program like Go's zero dependencies binary.
- SkiFire13 2y agoC# has an option to publish to a single self-contained file.
- osigurdson 2y agoIt would be big enough that people would find it annoying (unless using AOT which is hard).
- pjmlp 2y agoYou can choose how the linking process is done, just like you can chose to have a a Go binary with dependencies.
- fabian2k 2y agoC# can create single-binary executables, even without native AOT.
- cardanome 2y agoThey are still going to significant bigger than the equivalent golang binary because of the huge .NET runtime, no?
- fabian2k 2y agoDepends 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.
- zigzag312 2y agohttps://github.com/MichalStrehovsky/sizegame https://github.com/MichalStrehovsky/sizegame C#: 945 kB Go: 2174 kB
- ricardobeat 2y agoIs this a fair comparison, won't doing anything more significant than `print` in C# require a .NET framework to be installed (200MB+)?
- ChocolateGod 2y agoSpending 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.
- neonsunset 2y agoNo. 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).
- deleted 2y ago[deleted]
- xarope 2y agoSince this is just Hello World, then TinyGo: 644kB
- Rapzid 2y ago