Hey folks! Following up on a great WWDC session yesterday that ran out of time:
I am building a tool that:
takes any module/library that can be imported & used in Swift code.
It should support everything from the Swift stdlib to Apple's Objective-C libraries e.g. CoreLocation
generates a module with a 100% equivalent API. Not trying to replicate the functionality/behavior of the module at all, just the compile-time interface. In other words, somebody should be able to swap out the original library for the generated one without having to change their code at all, and everything should still compile.
Assuming I have a .swiftinterface file for the library, is there any information lost/not present there that would prevent me from being able to generate an equivalent module (as discussed above)?
For what kinds of dependencies is a .swiftinterface file not going to be available? What about Objective-C/C++/C libraries?
In those scenarios, are there internal/private ways I could theoretically take advantage of to generate a .swiftinterface file (or equivalent)?
For pre-built scenarios where a .swiftinterface file should exist, how do I find it? To start with, for the Swift stdlib and iOS libraries e.g. CoreLocation