Support bridging Option<SwiftClass>
in extern "Rust"
function
#268
Labels
good first issue
Good for newcomers
Option<SwiftClass>
in extern "Rust"
function
#268
It is not currently possible to bridge
Option<OpaqueSwiftType>
in anextern "Rust"
function.For example, the following signature does not compile:
Potential Solution
Review the documentation for supporting a new signature https://github.com/chinedufn/swift-bridge/blob/master/book/src/contributing/adding-support-for-a-signature/README.md
Add
fn rust_reflect_option_swift_type(arg: Option<OptTestOpaqueSwiftType>) -> Option<OptTestOpaqueSwiftType>
to the Option integration testsswift-bridge/crates/swift-integration-tests/src/option.rs
Lines 1 to 144 in 58f4a40
OptTestOpaqueSwiftType
in here https://github.com/chinedufn/swift-bridge/blob/58f4a40f96bb050607c746376422ab3c62e0e771/SwiftRustIntegrationTestRunner/SwiftRustIntegrationTestRunner/Option.swift#L1-L68rust_reflect_option_swift_type
swift-bridge/SwiftRustIntegrationTestRunner/SwiftRustIntegrationTestRunnerTests/OptionTests.swift
Lines 93 to 99 in 53b118d
Option<SwiftType>
arg tooption_codegen_tests.rs
swift-bridge/crates/swift-bridge-ir/src/codegen/codegen_tests/option_codegen_tests.rs
Lines 773 to 833 in 58f4a40
swift-bridge/crates/swift-bridge-ir/src/codegen/codegen_tests/opaque_swift_type_codegen_tests.rs
Lines 5 to 67 in dd5bef5
Option<SwiftType>
inoption_codegen_tests.rs
swift-bridge/crates/swift-bridge-ir/src/codegen/codegen_tests/option_codegen_tests.rs
Lines 597 to 653 in 58f4a40
opaque_swift_type_codegen_tests.rs
:swift-bridge/crates/swift-bridge-ir/src/codegen/codegen_tests/extern_swift_function_opaque_swift_type_return_codegen_tests.rs
Lines 5 to 61 in 54b9c09
The text was updated successfully, but these errors were encountered: