Skip to content

extern Swift declaration not public #241

Description

@tmolitor-stud-tu

We are building a library that has swift code that should be called by rust in an extra swift file (besides the auto generated ones).
But we keep getting linker errors that __swift_bridge__$rust_handler could not be found.
Until we make the auto-generated function public:

@_cdecl("__swift_bridge__$rust_handler")
public func __swift_bridge__rust_handler (_ text: UnsafeMutableRawPointer) {
    rust_handler(text: RustString(ptr: text))
}

Could you fix the code autogenerator to make these public by default (or at least introduce some compile-time switch to do that)?

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions