Normally to export C APIs to swift, you need module maps. Please read this helpful link first: https://rderik.com/blog/making-a-c-library-available-in-swift-using-the-swift-package/