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
I tried to use the example as shown here to pass it to rust as a *mut MyStruct and I'm not too sure if it's because of the nature of the Struct or simply due to extern semantics in C#, but I was able to edit the values in rust, but they were not copied back into C#. On the other hand, the following did work but requires me to use unsafe code in C#:
var Output = new MyStruct[100];
unsafe
{
fixed(MyStruct* ptr = Output)
{
my_rust_function((IntPtr)ptr);
}
}
The text was updated successfully, but these errors were encountered:
I tried to use the example as shown here to pass it to rust as a
*mut MyStruct
and I'm not too sure if it's because of the nature of the Struct or simply due to extern semantics in C#, but I was able to edit the values in rust, but they were not copied back into C#. On the other hand, the following did work but requires me to use unsafe code in C#:The text was updated successfully, but these errors were encountered: