Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Getting these errors in my project #246

Open
lockieluke opened this issue Nov 5, 2023 · 1 comment
Open

Getting these errors in my project #246

lockieluke opened this issue Nov 5, 2023 · 1 comment

Comments

@lockieluke
Copy link

lockieluke commented Nov 5, 2023

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
Copy link
Collaborator

@lockieluke

Thank you for reporting this error.

Could you share an minimal project which reproduce this issue?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants