gpt4 book ai didi

.net - 微软开源 .NET 后 CoreCLR 与项目 Mono 的关系

转载 作者:行者123 更新时间:2023-12-03 23:58:11 27 4
gpt4 key购买 nike

有人可以向我解释一下 Mono 与 Microsoft 最近提供的开源/Linux 可移植 .NET 堆栈(CoreCLR、CoreFX、Roslyn、ASP.NET)之间的当前关系是什么?

很明显这些项目重叠,所以我很好奇他们两个的路线图是什么 - Mono 会以某种方式用微软的新组件替换他们自己的组件,还是它们会以某种方式共存?

最佳答案

From a Mono contributor on reddit:

I think people have the wrong mindset about this whole Mono/CoreCLR situation. Why should one VM becoming open source and being ported to other OSs mean that another VM can't exist? It'd be like saying that there should only be one Python implementation, or one JVM. That is not a good thing. Competition is healthy.

Mono happens to have a lot of features that CoreCLR doesn't: LLVM, full AOT, NaCl, tasklets, cross-VM GC bridge, various profiler modules, etc. Mono's startup time and runtime memory footprint are also optimized for platforms/devices that CoreCLR isn't (at least presently) even targeting. OTOH, CoreCLR has a more mature GC and generally better code generation (hence the slower startup time). The two VMs are good at different things, and there is no reason both cannot exist.

It's not like we insist on keeping our own code either. We're happy to switch to CoreCLR/reference source code when there are clear benefits to doing so (less maintenance, more correct, still portable enough). We've imported tons of reference source code already, and we're also importing certain parts of the CoreCLR VM:
https://github.com/mono/mono/blob/master/mono/metadata/decimal-ms.c
https://github.com/mono/mono/blob/master/mono/metadata/threadpool-ms.c


From a .NET member on HN:

The core framework libraries (CoreFX) - https://github.com/dotnet/corefx - are used for all .NET Core scenarios, including .NET Native (UWP). This means that your code does the same thing in all of these different environments, since it's using the same underlying framework libraries. Separately, the Mono project is taking a lot of the same code, which means that the base framework for Xamarin apps are becoming more compatible with CoreFX, too. Yeahh! We hope to make this more formal in the future. We talk to @migueldeicaza about this frequently.


基本上,它们之间发生了很多代码共享,如果它们将来融合,我不会感到惊讶。既然 MS 已经收购了 Xamarin,我认为他们不会对维护两个运行时非常感兴趣。

关于.net - 微软开源 .NET 后 CoreCLR 与项目 Mono 的关系,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/28379462/

27 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com