objc2 icon indicating copy to clipboard operation
objc2 copied to clipboard

Investigate implementing `header-translator` on top of Swift's `ClangImporter`

Open madsmtm opened this issue 1 year ago • 39 comments

In header-translator we have to do a bunch of hacks to account for the fact that a lot of things are not exposed to the libclang API. In particular the Swift attributes are desirable, e.g. the new NS_SWIFT_UI_ACTOR will help us a lot in knowing which things require MainThreadMarker before access!

So crazy idea: What if instead we forked/used Swift's ClangImporter and built directly upon their work instead? They already handle all the edge-cases, they have a system for importing .apinotes files, and so on.

Though that would probably require more fluency in C++ than I really have, as well as the hard work of actually figuring out how to interface with it in a nice way, and probably also a beefier computer to compile all that code than the one I currently have :/

madsmtm avatar Jan 15 '23 05:01 madsmtm