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 for self in #[async_ffi] #20

Open
yavko opened this issue Feb 19, 2023 · 2 comments
Open

Support for self in #[async_ffi] #20

yavko opened this issue Feb 19, 2023 · 2 comments
Labels
enhancement New feature or request

Comments

@yavko
Copy link
Contributor

yavko commented Feb 19, 2023

This is pretty self explanatory, would be nice to be able to use it with functions that use self
EDIT: This is kinda needed as all abi_stable methods in traits have to use self

@oxalica
Copy link
Owner

oxalica commented Feb 20, 2023

In which case do you need to make a method instead of a standalone function returning FfiFuture?
I expect it's only used right on the FFI boundary. See https://docs.rs/async-ffi/0.4.1/async_ffi/#performance-and-cost

@oxalica oxalica added the enhancement New feature or request label Feb 20, 2023
@yavko
Copy link
Contributor Author

yavko commented Feb 20, 2023

In which case do you need to make a method instead of a standalone function returning FfiFuture? I expect it's only used right on the FFI boundary. See docs.rs/async-ffi/0.4.1/async_ffi/#performance-and-cost

I'm creating a plugin system, and would like for it to be standardized and have support for Async, and Sync methods, even if Async comes with a cost, its not really a big deal for me.

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

No branches or pull requests

2 participants