-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Swift Option<String> and Option<&str> (#264)
This commit adds support for passing `Option<String>` to and from `extern "Swift"` functions, as well as for passing `Option<&str>` to extern "Swift" functions. For example, the following is now possible: ```rust #[swift_bridge::bridge] mod ffi { extern "Swift" { fn opt_string_function(arg: Option<String>) -> Option<String>; fn opt_str_function(arg: Option<&str>); } } ``` Note that you can not yet return `-> Option<&str>` from Swift. This is an uncommon use case, so we're waiting until someone actually needs it.
- Loading branch information
Showing
27 changed files
with
645 additions
and
132 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.