News for hackers. Stuff that matters.
Re:.NET 6 Released by mrweasel on Monday November 08, 2021 @03:32PM (#29153854)
Wait, wait… .Net can build “static linked” executables that doesn’t require that I install .Net to run? I had no idea, I guess it’s time to revisit .Net
Re:.NET 6 Released by abdusco on Monday November 08, 2021 @04:15PM (#29154377)
That's exactly what it is. You can even cross-compile for all supported platforms.

    $ dotnet new console -n HelloWorld
    $ dotnet publish --project HelloWorld -r osx-arm64 --self-contained -o out -p:PublishTrimmed=true
    $ du -sh out
    10M
Re:.NET 6 Released by the_arun on Monday November 08, 2021 @07:33PM (#29156229)
I haven't used .net. But how memory management happens when you are running a binary executable? Does it have a builtin CLR (Common Language Runtime[1])? Because CLR provides the tools for managing memory & security?

[1] https://en.wikipedia.org/wiki/Common_Language_Runtime

Re:.NET 6 Released by sitharus on Monday November 08, 2021 @08:02PM (#29156416)
Yes, it embeds the CLR in to the application see the PR at https://github.com/dotnet/runtime/issues/43072
Re:.NET 6 Released by qwertox on Monday November 08, 2021 @06:52PM (#29155924)
Wow... I didn't know. Since when can it do this?
Re:.NET 6 Released by chunkyks on Monday November 08, 2021 @09:04PM (#29156847)
I've been using this for at least a year or two. With their stripping, my binaries (which use very little other than system.* and math.*) are 12M in size on each OS. I tested with today's release of version six, the binaries are about 1M smaller each.
Re:.NET 6 Released by tester756 on Monday November 08, 2021 @07:10PM (#29156059)
I believe it was introduced around .NET Core 5? or 3? so at least 1 year ago
Re:.NET 6 Released by metaltyphoon on Monday November 08, 2021 @08:00PM (#29156408)
Since .net core 3.0
Re:.NET 6 Released by Anon4Now on Monday November 08, 2021 @10:31PM (#29157386)
After almost 18 years, Joel finally got his wish:

https://www.joelonsoftware.com/2004/01/28/please-sir-may-i-h...

Re:.NET 6 Released by jug on Monday November 08, 2021 @07:24PM (#29156171)
This, combined with linker stripping below even assembly level for smaller static binaries.

.NET 7 will work on NativeAOT for instantaneous startup of especially smaller apps, but I think they’ve already optimized JIT warmups or something — I was pleasantly surprised when I just wrote a .NET 6 console app that read JSON from a server.

Re:.NET 6 Released by JohnTHaller on Tuesday November 09, 2021 @02:57PM (#29166654)
If it's like v5, you can. They're big (since they include .NET, though it looks like v6 will strip out more than v5). And they won't run on Windows 7 without an administrator installing a system component first.