4 ms·
> Being able to make an easy-to-deploy binary just by typing "go build" is huge, and the compile times are great. Sure, .NET supports some form of AOT compilati
by sdflhasjd 6y ago
> Being able to make an easy-to-deploy binary just by typing "go build" is huge, and the compile times are great. Sure, .NET supports some form of AOT compilation, but it's not the default, and when I google ".net core aot", the first thing that pops up is the CoreRT repo that says "This is an experimental project. We have no plans to productize it in its current form" which is not super encouraging.
While not the same thing as AOT compilation, `dotnet publish -p:PublishSingleFile=true` achieves the goal of having a self contained executable.
- coder543 6y agoDefinitely good to know. Not a critical feature these days with CI being as good as it is, but can you run that command from macOS or Windows and get a Linux binary?
- unsignedint 6y agoYes, you can cross compile to any supported target using -r flag followed by a RID (e.g. win-x64) https://docs.microsoft.com/en-us/dotnet/core/rid-catalog https://docs.microsoft.com/en-us/dotnet/core/rid-catalog
- naikrovek 6y agoLast I checked, the single file executable produced by dotnet is a self-extracting zip file of the application and the required dotnet framework, which gets unpacked into a temp folder and run from there. Go ACTUALLY produces single file executables. The severity of this is up for debate, but I think Microsoft shouldn't be calling this a single file executable. Source: https://docs.microsoft.com/en-us/dotnet/core/whats-new/dotnet-core-3-0#single-file-executables https://docs.microsoft.com/en-us/dotnet/core/whats-new/dotne...