C++ part of the swift wrapper to manage C++ objects lifetime through Swift's ARC by using their semantics
Swift part contains wrappers of those C++ objects for more friendly usage
Tests for Swift wrapper
Swift Dictionary -> ac::Dict
ac::Dict -> Swift Dictionary
Creation of model, instance and running op
Examples of Swift wrapper
e-Dummy which does not load any model, just easy use of the API
e-Whisper loading Whisper.cpp which loads model and loads WAV audio to transcribe it
Cocoa wrapper for Obj-C++ users which only contains translation of ac::Dict to NSDictionary and reverse, because the rest of the API can be imported in Obj-C++ as regular C++ code.
Tests for ac::Dict translation
We're using XCTest for Swift and ObjC++ tests because it seems like it's the only library which is directly supported from CMake. However, we couldn't make it work out-of-the-box without Xcode, to do that we've included 3rd part Cmake Module which adds additional setup to the toolchain, so we can properly test without Xcode (Which will be helpful for non-Mac developers).
This PR contains:
C++ part of the swift wrapper to manage C++ objects lifetime through Swift's ARC by using their semantics
Swift part contains wrappers of those C++ objects for more friendly usage
Cocoa wrapper for Obj-C++ users which only contains translation of ac::Dict to NSDictionary and reverse, because the rest of the API can be imported in Obj-C++ as regular C++ code.
We're using XCTest for Swift and ObjC++ tests because it seems like it's the only library which is directly supported from CMake. However, we couldn't make it work out-of-the-box without Xcode, to do that we've included 3rd part Cmake Module which adds additional setup to the toolchain, so we can properly test without Xcode (Which will be helpful for non-Mac developers).