Hi everyone! Swift represents a tremendous opportunity for the game development community. Its characteristics make it very well suited to game engine and gameplay code. So imagine my excitement when I saw the news about C++ interoperability.
A practical example of the potential of C++ interoperability in games is the use of Swift to write games with Godot, a C++ game engine. SwiftGodotKit is a tremendously exciting project, and works brilliantly on macOS. C++ Godot symbols are available in Swift and it is magical to behold.
However - Swift will not reach its potential as a game development language if it does not work well on Windows. Much as I love the productivity improvements Swift brings, limiting a game release to macOS only is not often commercially viable.
Right now, it appears that the limiting factor for Swift game development is an inability to perform Swift/C++ interop with Windows DLLs.
To use the SwiftGodotKit example, libgodot.xcframework
makes the underlying .dylib available to Swift using all the behaviours mentioned in Swift.org documentation, such as a modulemap. However, I can't find any information about whether such behaviours can be emulated in the Windows DLL context.
Is anyone able to share more information or knowledge about the current state of interop with Windows DLLs, or any plans for the future? While Windows DLLs are certainly not my strong suit (as evidenced by my clumsy phrasing in this post), I would be thrilled to help out any way I can.
- Hugh