Over the past little while I've been exploring the idea of writing a "hybrid" C#/Swift app by using Swift's new C++ interop feature as a "bridge" between the two worlds. We'd eventually like to ship production-quality apps to users in this manner, and it was a long journey with lots of twists and struggles.
The result is a command-line tool called
SwiftToCLR that automatically generates the wrapper layers needed to call into Swift from C# (via C++/CLI).
I've made an extensive write-up of this project in the form of a blog post and a GitHub repo containing everything I've built.
The blog post is a lighter discussion of the project and its journey, and you can find that here: Daniel Kennett - Proof of Concept Project: Combining Swift and C# on Windows with SwiftToCLR
The GitHub repo's README is a more technical overview of the challenges involved, as well as the current Swift C++ interop limitations that we'd need to work around (or wait to get resolved) in order to continue. That's here: GitHub - Cascable/swift-on-windows-poc: A proof-of-concept project for Swift on Windows with bindings to C#/the CLR.
Depite the current limitations, this was a really interesting project and I'm really excited about the future of Swift on Windows.
(I wasn't sure whether this should go in here, the Swift on Windows subforum, or the C++ Interop subforum - hopefully here + tags is correct.) Perhaps this is interesting to @cxx-interop-workgroup too?