thorium-cfx / mono_v2_get_started

Mono v2 runtime for FiveM/RedM
38 stars 5 forks source link

Question: mono or coreclr? #27

Closed Nova-px closed 1 year ago

Nova-px commented 1 year ago

Hello, I just wanted to ask why mono is used instead of coreclr for the c# implementation in fivem. A multiplayer modification is currently using coreclr for their c# implementation, and it's working fine. I don't want to criticize anyone here, but it's just interesting to me, especially with coreclr it should be possible to use one of the newest .net versions (like 6 or 7 ?)

I would appreciate an answer

thorium-cfx commented 1 year ago

The main reason would be sandboxing, the technology used to achieve this has been removed in .NET 6+ (some already in .NET Core) as can be seen here: https://learn.microsoft.com/en-us/dotnet/core/porting/net-framework-tech-unavailable.

So to achieve sandboxing again in these newer versions, we'd need to add it ourselves, which takes a thorough understanding, design, and a new implementation to get right and especially secure. And as priorities lies elsewhere right now, there's been no decisions on it yet.

(closing this, but you can still comment)

Nova-px commented 1 year ago

That is definitely the answer for my question, thank you. So if I understand it right, It's currently not decided if the v2 runtime of c# will use mono, right?

thorium-cfx commented 1 year ago

It's actually already running on mono, do need to enable the pilot again. But all C# code isn't depended on mono, if that's what you're wondering about.

Nova-px commented 1 year ago

I mean, if It's still possible that the v2 runtime will change from mono to coreclr

thorium-cfx commented 1 year ago

That is indeed possible with the needed changes :)

Nova-px commented 1 year ago

Okay, my last question would be if there are any new information on the c# keymaster (adhesive) implementation or if it's possible to support the integration in any way?

thorium-cfx commented 1 year ago

I'm not sure what you are referring to

Nova-px commented 1 year ago

Currently, only Lua is supported by keymaster and my question is if there is any progress on implementing c# into keymaster (escrow encryption)

thorium-cfx commented 1 year ago

Ah Escrow encryption, only thing I can say about it is that we need to find ways to safely decrypt them before we can continue with that.