3 ms·
A Swift package can have modules/targets that are C/C++. It delegates the module building to clang, and Swift can both read/use those modules and publish its o
by w10-1 3y ago
A Swift package can have modules/targets that are C/C++. It delegates the module building to clang, and Swift can both read/use those modules and publish its own API for use from C/C++. In Swift the "unsafe" family of API's converts Swift objects to C/C++ pointers relatively ergonomically. Note that Swift 5 added a lot of features to support ABI stability.
https://www.swift.org/documentation/cxx-interop/ https://www.swift.org/documentation/cxx-interop/