Delta 2.1
Delta 2.1
CC#
Created by Delta 2.1 on 1/21/2024 in #help
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
CC#
Created by Delta 2.1 on 12/16/2023 in #help
function pointer
I need to have some kind of array of function pointer, which can be pretty big, how to encapsulate a managed Function Pointer like a Delegate, with support of arguments by ref ?
30 replies
CC#
Created by Delta 2.1 on 12/11/2023 in #help
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