-
Notifications
You must be signed in to change notification settings - Fork 7
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Easier method of executing Rust code from C# #32
Comments
You have 2 options :
Calling rust from C# allow you to use unmanaged structs as function paramter, and all kind of references will be marshall as pointer (or rust references).
hope this helps |
Hi @D3lta-2-1 , I was very happy to find your instructions because your second option was exactly what I was trying to do, i.e.: call rust code from my managed code. I did recompile my host application binary with Now, looking at the binary itself, I seem to be missing an EDIT: FTR, I also tried
EDIT2: I wrote a small C program that dlopens itself to see if a |
Hello, I was wondering of an easier method to execute Rust code (unmanaged) from C# (managed). I already know of the return-string-from-managed example and was able to easily get it working, but it required a field and two methods to be created for a single unmanaged method:
Mono has a really simple way to call managed code from unmanaged code by adding an attribute:
Is there anyway that running managed code from unmanaged code could become easier and lead to less boilerplate? If its not implemented just yet, I may be able to mess around with implementing it and make a PR, or just hack something up to get it working for me. Thanks!
The text was updated successfully, but these errors were encountered: