-
Notifications
You must be signed in to change notification settings - Fork 1.4k
Change Foreign Function Interface / Complex example #643
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
Comments
Yeah, sounds good. I'm happy to mentor someone to fix this issue; we should figure out a good example, and then implement it! |
I'd be happy to take a stab at this, splitting the FFI into sections for 'calling into C' and 'exposing a C interface'. For the first example, maybe just calling out to For the example going the other way (exposing a C interface) there's obviously a bit more flexibility. I would propose some example that involves returning an opaque pointer to some rust type, and then maybe calling some functions with string arguments and string return values, since those can be a bit tricky? But basically just trying to cover the things I've previously had to look up in the ffi omnibus. Let me know if this would be helpful. =) edit: took a peek, and libcurl doesn't make a great example. I'll dig around a bit and try to come up with something else. |
Hi, I'm closing this issue just to clean up the items that already exist. If you think this issue makes sense to stay open, please create a new issue with updated information and mention this one. thanks! |
We have no portable way (1) (2) to pass complex values in ffi, so we should use a different example for ffi. Current example is not portable (fails on 32-bit x86 for example).
The text was updated successfully, but these errors were encountered: