-
Notifications
You must be signed in to change notification settings - Fork 62
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 Box<FnOnce> in extern "Rust" #242
Comments
Can you comment with a minimal example bridge module that generates this error?
Right now we support passing an
Here are some relevant links that should help with adding support for your swift-bridge/crates/swift-bridge-ir/src/codegen/codegen_tests/boxed_fnonce_codegen_tests.rs Lines 382 to 430 in af962ca
swift-bridge/crates/swift-integration-tests/src/boxed_functions.rs Lines 37 to 53 in af962ca
Please feel free to ask more questions as you go! |
I think this was the source of my confusion. I was attempting to send a Closure from Swift to Rust, and call it in Rust. I edited the issue title to reflect this. Thank you for the implementation guidance! If I have more questions can I just tag you here? |
Absolutely! |
When you declare
FnOnce
on a Swift type, it doesn't work. The error output says:It looks like considerable work has been done to support
FnOnce
, but they're not hooked up inbridged_types
. There's just TODOs there. Is there something about the implementation that needs to be fixed? If so I'd be happy to look into it, I'd just appreciate some context :)Thanks for sharing this project btw, it's amazing 😎
The text was updated successfully, but these errors were encountered: