If my bridge module contains the below then the resulting generated Swift fails to compile, because it's trying to return from a convenience initialiser instead of calling .init
extern "Rust" {
struct T;
#[swift_bridge(init)]
fn new() -> Result<T, String>;
}
as a workaround one can use the following, but it's not ideal.
extern "Rust" {
struct T;
#[swift_bridge(associated_to = T)]
fn new() -> Result<T, String>;
}
If my bridge module contains the below then the resulting generated Swift fails to compile, because it's trying to return from a convenience initialiser instead of calling
.initas a workaround one can use the following, but it's not ideal.