This thread may help: Best way to call a Swift function from C?. Nearly a year since the last update so you may be lucky in Swift 5.7.
This thread may help: Best way to call a Swift function from C?. Nearly a year since the last update so you may be lucky in Swift 5.7.