C++ interop mode not creating headers from Swift Package Manager

It's not yet possible to pass a Swift value type across the Swift -> C++ -> Swift boundary (only across the Swift -> C++ boundary), so I would recommend using a std::vector instead as you mentioned in your second post. Right now only Swift class types can be passed across the Swift -> C++ -> Swift boundary transparently.

I understand however, that I need a Swift target, compiled with swiftSettings: [.interoperabilityMode(.Cxx)] that I can use to provide Swift types to C++. So I've done that. I then need to include it from C++ (like so… #include <earcut_bridge/earcut_bridge-Swift.h> )…

The Swift Package Manager does not yet provide support for using the generated header to use Swift APIs in C++. This is going to be addressed by SE0403: SE-0403: Package Manager Mixed Language Target Support .

3 Likes