I love the low level .NET stuff Michael Strehovsky makes. Microsoft has built a feature-rich and easy-to-use environment, but it makes .NET developers think there is only one way to use it: create csproj and call dotnet build.<p>But underneath the covers, there is an extremely powerful compiler (Roslyn) and build-system (msbuild). Combine that with the flexibility of C# and you can develop pretty much anything.
It is pretty impressive that even without third-party tools, the binary went from 64 MB to ~1 MB. IMO future versions of .NET should add more of such optimisation flags as default in a Release build.
In a similar vein, there's Can you fit a whole game into a QR code? by MattKC, which is limited to about 3 kilobytes (2,953 bytes)<p><a href="https://youtu.be/ExwqNreocpg" rel="nofollow">https://youtu.be/ExwqNreocpg</a>
This is really cool, but it's funny to use C# primarily as an awkward substitute for C as you call Win32.<p>For most practical purposes, the default .NET 8 AOT is great if you really need native code.
Someone with an iPhone told me the webm video embedded in the article still doesn't work on iPhones in 2024 so here's another link to the video: <a href="https://twitter.com/MStrehovsky/status/1742101904250060842" rel="nofollow">https://twitter.com/MStrehovsky/status/1742101904250060842</a>
Very cool. What are the practical implications for this? Would it ever be wise to deploy these techniques for a commercial program? Is the end result more memory efficient during execution?