Delta 2.1
I've loaded CoreClr from hostFxr and it looks like the garbage Collector is not doing his job...
I'm trying to build a safe interop with Rust and C#, And I wanted SafeHandle to manage native rust object in C#, but DestroyHandle() is never called (while all references to this object are out of scope). so I tried to make a basic objet with a finalizer (inheriting CriticalFinalizerObject) and this finalizer is never called too...
My entry point is an unmanagedMethod, and CoreClr is loaded with the netCoreHost rust crate.
9 replies
embding C# for scripting in rust
I'm looking for a way to host C# for scripting, like Unity and godot do. I looked for mono, but I learn that "mono is dead" (since it only support C#7 and we are at C#11) and I should use dotnet now. But mono api for embding was far more complete. How do I expose native function to C#, there is no way to avoid unmanagedCallerOnly on C# callbacks ? How to handle exception (from what i've read, they are only supported on window, any other platfrom will result to an UB)
12 replies