3 ms·
It's not clear to me that it's impossible. The ABI isn't a huge issue; templates are, though. I can see a potential path forward by using clang heavily, but it
by pcwalton 11y ago
It's not clear to me that it's impossible. The ABI isn't a huge issue; templates are, though. I can see a potential path forward by using clang heavily, but it requires a lot of thought.
Isn't Swift looking heavily into C++ interop? It might make sense to collaborate with them to get it to work in both languages.
- steveklabnik 11y agoSwift is implemented in C++, and uses LLVM stuff that we don't because it's not exposed in the C ABI, last I heard.
- pcwalton 11y agoWell, sure, but how the compiler calls into libclang/LLVM isn't the difficult issue here. The more interesting issue is how, conceptually, the Swift or Rust compiler would use libclang to interoperate with C++ in a foreign environment. Once that's established, writing C bindings to whatever part of libclang is necessary should be straightforward.