You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
The ordinal coreclr runtime requires JIT and won't be available on iOS-like platforms.
There are coreclr-compatible Mono runtime in this repo supporting iOS. The NativeAOT variant of coreclr also starts experimental support for iOS. The .NET Core platform supports iOS.
Notably, that is support strictly for the iOS Simulator. It is not meant to handle anything else. It is purely a way to have faster debug loop for apps that you intend to run with NativeAOT. The JIT restrictions for dynamic code still apply to device deployments and hence CoreCLR cannot be used there.
I think @lambdageek, @ivanpovazan maybe able to answer this. It seems like interest is building up with the increase in NativeAOT usage. :)
NativeAOT-Mint was a quick hackathon experiment designed to answer the question: "Is it possible to retarget the Mono Interpreter on top of another .NET runtime, or is it too dependent on Mono's underlying implementation." The answer from the experiment was "yes, it is possible, but NativeAOT is not the right runtime - the amount of work to make NativeAOT support dynamic code execution is too great". So what about Mint in CoreCLR? That's an interesting future experiment. At this time there are no plans, but it's something we've thought about.
Activity
huoyaoyuan commentedon Mar 21, 2024
The ordinal coreclr runtime requires JIT and won't be available on iOS-like platforms.
There are coreclr-compatible Mono runtime in this repo supporting iOS. The NativeAOT variant of coreclr also starts experimental support for iOS. The .NET Core platform supports iOS.
newNcy commentedon Mar 21, 2024
我的场景是ios上 c++引擎嵌入c#运行时,不过还在调研,基本需求是 -多个实例 -热更新 -导入导出c++接口
试了下mono发现不能多个实例,才想看看coreclr, 有推荐的吗
huoyaoyuan commentedon Mar 21, 2024
目前所有CLR实现都不支持单进程内多个实例,AssemblyLoadContext可能可以部分满足需求。
NativeAOT是不会支持热更新的,只有启用解释器的Mono可能可以,但是是否启用了相关API也不确定。
newNcy commentedon Mar 21, 2024
mono试了可以热更,不过对alc支持不完善,基本不可用感觉
#79711
newNcy commentedon Mar 21, 2024
还有别的办法能实现 B C两个DLL都引用了A DLL,但是互相隔离的嘛 哪怕是静态变量这种
srxqds commentedon Mar 21, 2024
mono的alc是不行的,要自己改虚拟机,mono的开发比较坑
srxqds commentedon Mar 21, 2024
@huoyaoyuan 我一直跟进mono的嵌入开发5年多了,坑特别多,有没有什么渠道可以反馈下,让官方重视下吗?
newNcy commentedon Mar 21, 2024
不能并行的话有没有前一个用了清理一下重新加载的方法
srxqds commentedon Mar 21, 2024
不能,bug很多
newNcy commentedon Mar 21, 2024
好吧 谢谢
huoyaoyuan commentedon Mar 21, 2024
Mono部分人手不多,代码结构也区别很大。我个人没有深入研究过Mono代码,不好断言工作量多大,但不排除巨坑的可能。
目前阶段官方对Android/iOS的工作主要是把CoreCLR的NativeAOT适配过去。
srxqds commentedon Mar 21, 2024
像这种必现的问题:#98805 官方也没有动力去修复,都是懒得去验证
am11 commentedon Mar 21, 2024
Not yet: #98127
11 remaining items
newNcy commentedon Mar 21, 2024
阿这,我mono用alc.Unload() 静态容器里的东西也没清理掉 难绷
srxqds commentedon Mar 21, 2024
你可以理解为他们这个完全没实现就行了,是完全
因为他们把collectiable直接设置为false了
filipnavara commentedon Mar 21, 2024
Notably, that is support strictly for the iOS Simulator. It is not meant to handle anything else. It is purely a way to have faster debug loop for apps that you intend to run with NativeAOT. The JIT restrictions for dynamic code still apply to device deployments and hence CoreCLR cannot be used there.
lambdageek commentedon Mar 22, 2024
NativeAOT-Mint was a quick hackathon experiment designed to answer the question: "Is it possible to retarget the Mono Interpreter on top of another .NET runtime, or is it too dependent on Mono's underlying implementation." The answer from the experiment was "yes, it is possible, but NativeAOT is not the right runtime - the amount of work to make NativeAOT support dynamic code execution is too great". So what about Mint in CoreCLR? That's an interesting future experiment. At this time there are no plans, but it's something we've thought about.
newNcy commentedon Mar 22, 2024
这个作用范围是整个alc吗
srxqds commentedon Mar 22, 2024
对,就是内部直接设置了false,即使脚本设置为true
newNcy commentedon Mar 22, 2024
确实,临时变量都没gc,估计有bug就直接false了
newNcy commentedon Mar 22, 2024
还有别的clr可选嘛
huoyaoyuan commentedon Mar 23, 2024
.NET Framework,.NET Core的实现都是如此
newNcy commentedon Mar 25, 2024
coreclr没有解释模式吗
huoyaoyuan commentedon Mar 25, 2024
目前处于无人维护的状态,仅限入门级程序可以跑通。mono的解释器一直都有维护,Mint的试验是将其对接到coreclr或NativeAOT上。
newNcy commentedon Mar 25, 2024
说起来mono aot跟native aot的区别主要在哪,native代码的多少吗