MichalStrehovsky / zerosharp

Demo of the potential of C# for systems programming with the .NET native ahead-of-time compilation technology.
2k stars 103 forks source link

Dynamically linking against C library #49

Closed MAG-MichaelK closed 9 months ago

MAG-MichaelK commented 10 months ago

In the readme, it is mentioned that most of the size of the with-runtime example comes from the C library. Is it possible to instruct NativeAOT to dynamically link against msvcrt on Windows instead of statically linking it?

MichalStrehovsky commented 10 months ago

This is no longer accurate. Native AOT now links against ucrt on windows by default and it was linking dynamically everywhere else for a while

MAG-MichaelK commented 9 months ago

it was linking dynamically everywhere else for a while

So is it no longer doing that, or is it indeed dynamically linking on all platforms now?

MichalStrehovsky commented 9 months ago

Dynamic to ucrt on windows and dynamic to glibc/musl on linux