chinedufn / swift-bridge

swift-bridge facilitates Rust and Swift interop.
https://chinedufn.github.io/swift-bridge
Apache License 2.0
842 stars 62 forks source link

Getting these errors in my project #246

Open lockieluke opened 1 year ago

lockieluke commented 1 year ago

image

Using code from documentation:

#[swift_bridge::bridge]
mod ffi {
    extern "Rust" {
        type RustApp;

        #[swift_bridge(init)]
        fn new() -> RustApp;

        fn generate_html(&self, rust_code: &str) -> String;
    }
}

pub struct RustApp {}

impl RustApp {
    fn new() -> Self {
        RustApp {}
    }

    fn generate_html(&self, rust_code: &str) -> String {
        return format!("Hello, {}!", rust_code);
    }
}

Build phases: image

NiwakaDev commented 1 year ago

@lockieluke

Thank you for reporting this error.

Could you share an minimal project which reproduce this issue?