I'm working on a fairly large project that is implemented as a shared library - it's going to be used by lots of different consumers, each written in different languages.
The lowest common denominator here is C. I'd prefer to write as much of the code as possible in Swift, but at the end of the day, it needs to be compiled down to a shared library that any code written in C can call.
A good way of thinking about what I'm trying to accomplish: I am creating a data processing library that will eventually need to be callable from Python, C, Lua, etc, and I would like to write said library in Swift. Is such a thing possible?
(Please note this is not the same thing as calling C from Swift, nor is it the same thing as passing a Swift function to a C function that requires a callback.)
(This would also be used on not just Apple platforms, but Linux and Windows as well.)