Swift compiler library usage

You can find some examples here: GitHub - compnerd/swift-cmake-examples: Swift example projects

Mixing this with C/C++ should be as simple as adding the relevant C/C++ sources to the CMake file. Accessing C code from within your Swift code is fairly straightforward (see the HelloWorld example). If you want to access C++ code directly (i.e. without going through a C interface), you would need to turn on experimental C++ interoperability. With a little bit of work and some caveats, you can also call Swift code from C or C++.