0.1.48
-
Support returning
Result<T, E>
whereT
andE
are opaque Rust types. #149// For example, the following is now possible: #[swift_bridge::bridge] mod ffi { extern "Rust" { type TypeA; type TypeB; fn some_function() -> Result<TypeA, TypeB>; fn print_info(self: &TypeB); } }
// Swift do { let typeA = try some_function() } catch let typeB as TypeB { typeB.print_info() }
-
Support
Option<Vec<T>>
whereT
is a primitive type. #147 (thanks @NiwakaDev)// For example, the following is now possible: #[swift_bridge::bridge] mod ffi { extern "Rust" { fn some_function(arg: Option<Vec<u8>>) -> Option<Vec<i64>>; } }
-
Optimize
RustStr
's SwiftEquatable
protocol implementation. #151 (thanks @NiwakaDev) -
Add compile time error messages for invalid
args_into
attributes. #145 (thanks @NiwakaDev)