4 ms·
I know .NET Core applications could run on Linux. But do they natively (without any wrappers) support Linux OR is there a wrapper to simulate windows within Lin
by the_arun 6y ago
I know .NET Core applications could run on Linux. But do they natively (without any wrappers) support Linux OR is there a wrapper to simulate windows within Linux?
- nwah1 6y agoIt supports linux natively. Anything windows-specific requires libraries that you can optionally add.
- GordonS 6y agoSomeone already answered this, but yes, it's native. I've been building with C# since it was first released, and dotnet core has really opened up development on Linux for me - I build apps for Linux and Docker all the time, and they "just work" the same as they do on Linux.
- MarkSweep 6y agoThe C# libraries either invoke the native Linux libraries directly or go throw a thin wrapper[1] that does the normal things you have to do to support multiple flavors of Unix (epoll vs kqueue, etc). Parts of the C++ runtime are written in terms of the Win32 API and on Unix these API are implemented in the PAL[2]. The PAL is not that big and I don’t the steady state performance critical code paths go through it. 1: https://github.com/dotnet/runtime/tree/master/src/libraries/Native/Unix/System.Native https://github.com/dotnet/runtime/tree/master/src/libraries/... 2: https://github.com/dotnet/runtime/tree/master/src/coreclr/src/pal https://github.com/dotnet/runtime/tree/master/src/coreclr/sr...
- spoonspoon2 6y agonative support, no emulation etc.
- oaiey 6y agoIt would never achieve its performance if it would wrap something. .NET on Linux is as native on Linux as is Java, Python or Go. Also priority in Microsoft has completely changed. Most .NET runs on Linux nowadays (dockerized or not). It actually does the opposite: it is able to expose memory-alike resources (from e.g. the network interfaces) deep into its consuming programs by using abstractions like Span<T>. And while that sounds like a wrapper, it is actually (depending on the "alike") just a typed and safe pointer.