4 ms·
Is there a plan for c++ Interop in swift. Or have they decided that using the obj-c bridging layer is enough.
by ssvss 8y ago
Is there a plan for c++ Interop in swift.
Or have they decided that using the obj-c bridging layer is enough.
- kitsunesoba 8y agoAFAIK it’s still in the cards but it’ll come after ABI stability. I have at least one project that’ll make use of this — can’t wait to drop the ObjC layer in it entirely.
- favorited 8y agoIt's on the list of things that would be nice someday, but it will take a lot of time to get right, and it's not a high enough priority right now. There's a handful of other significant features that will come first, like ABI stability, Ceylon/Rust style ownership checking, first-class concurrency/atomics (async/await, etc.). That said, Swift's C interop will work if you write an `extern "C"` interface to your C++. Obviously it's not ideal, but people have done projects like llvm-swift[0], with LLVM obviously being a C++ project. [0]https://github.com/llvm-swift/LLVMSwift https://github.com/llvm-swift/LLVMSwift