Skip to content
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

Support function pointer types #4

Open
harpocrates opened this issue Nov 30, 2017 · 2 comments
Open

Support function pointer types #4

harpocrates opened this issue Nov 30, 2017 · 2 comments

Comments

@harpocrates
Copy link
Owner

There is some trickiness around FunPtr and "dynamic" foreign imports.

See the docs on FunPtr for more information.

@harpocrates
Copy link
Owner Author

These are now supported, but not automatically. Utilities are provided for automatically marshaling into and out of FunPtr. That said, it is on the user to free the FunPtr (in general, we have no way of knowing when there are no references to FunPtr on the Rust side).

@harpocrates
Copy link
Owner Author

Before closing this issue, I have once more idea: let Rust take ownership of the function pointer! Here is a sketch of what the types might be on the Rust side. This doesn't mean nuking our existing function pointer approach, but it is a compelling alternative context.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant