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 Swift func returns Opaque Swift #109

Merged
merged 1 commit into from
Aug 23, 2022

Conversation

chinedufn
Copy link
Owner

This commit adds the ability for a Swift function or method to return an
opaque Swift type.

For example, the following is now possible:

#[swift_bridge::bridge]
mod ffi {
    extern "Swift" {
        type SomeType;

        fn some_function(arg: SomeType) -> SomeType;
        fn some_method(&self, arg: SomeType) -> SomeType;
    }
}

@chinedufn chinedufn force-pushed the swift-method-return-class-instance branch from bd7508b to 708a532 Compare August 23, 2022 16:55
This commit adds the ability for a Swift function or method to return an
opaque Swift type.

For example, the following is now possible:

```rust
#[swift_bridge::bridge]
mod ffi {
    extern "Swift" {
        type SomeType;

        fn some_function(arg: SomeType) -> SomeType;
        fn some_method(&self, arg: SomeType) -> SomeType;
    }
}
```
@chinedufn chinedufn force-pushed the swift-method-return-class-instance branch from 708a532 to a69801c Compare August 23, 2022 17:00
@chinedufn chinedufn merged commit 10e616b into master Aug 23, 2022
@chinedufn chinedufn deleted the swift-method-return-class-instance branch August 23, 2022 17:12
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

Successfully merging this pull request may close these issues.

1 participant