News for hackers. Stuff that matters.
Re:Support Single-File Apps in .NET 5 by MarkSweep on Thursday May 21, 2020 @01:29AM (#23255111)
With the right flags you can get Hello World down to about 2MB of managed assemblies. You will still have about 16 MB of native:

https://github.com/AustinWise/IlLinkerExample

You basically have to directly fiddle with the flags to the IL linker to really get the size down. It's a pain. They are working on designs to make it better:

https://github.com/dotnet/designs/pull/123

I think these changes can make self contained .NET apps compare more favorably to Go apps, at least for larger applications. It would probably take something more like CoreRT to get app size to be competitive with Rust and C.

Re:Support Single-File Apps in .NET 5 by throwaway_pdp09 on Thursday May 21, 2020 @03:50AM (#23255850)
> you can get Hello World down to about 2MB

(sobs woefully)

Re:Support Single-File Apps in .NET 5 by userbinator on Thursday May 21, 2020 @09:44AM (#23258241)
In contrast, a pure Win32 Hello World (with GUI) can be 2KB or less with only the addition of some non-default linker options.

That's 3 orders of magnitude difference. Obviously it won't be as much with more complex applications, but it's still funny to see others here considering a dozen MB or so for doing something trivial to be small, when that's the size of a full installation of Windows 3.11 complete with all its built-in apps.