.NET Runtime
目前比较粗浅的理解:
- .NET Framework是继承在Windows系统中的,不开源
- .NET Core、 .NET 5+ 这些是开源,其runtime叫做CoreCLR
- 主要是为后端以及云端应用服务,优化方向为吞吐量以及性能
- 最早的仓库在https://github.com/dotnet/coreclr,后来移至https://github.com/dotnet/runtime
- Mono原先是社区依据C#和CLR规范实现的一套.NET在Windows以外平台的方案,后来被微软收入麾下
- 可以运行在移动设备上
- 支持Xamarin跨平台开发
- 从.NET 6开始,CoreCLR和Mono的后端实现开始趋同
其他参考
.NET AOT
- .NET Native
- 用于UWP应用的AOT。
- 总体技术向C++靠拢,所链接的库有所不同,会采用.NET Framework 以及MRT.dll (Minimal CLR Runtime)。
- corert
- 更名成了NativeAOT
-
The ahead-of-time (AOT) toolchain can compile .NET application into a native (architecture specific) single-file executable. It can also produce standalone dynamic or static libraries that can be consumed by applications written in other programming languages.
- mono aot
- crossgen2,参考Conversation about crossgen2
- 应该是混合形式的AOT
其他参考:
- Is it possible to use .NET Native without UWP?谈到了其他的几个项目,比如https://docs.unity3d.com/Manual/IL2CPP.html以及https://github.com/dotnet/coreclr/blob/master/Documentation/building/crossgen.md。
(本篇完)
2021-08-221更新
.NET支持SingleFile,可以将应用程序关联的所有内容打包成单个文件,参考Single file deployment and executable。
(更新完)