Is there any way to preview the UI that I built? Or all I can do on Windows is to get to know the basics of Swift, and I eventually have to buy a Mac to build and test more comolicated things?
How did you build the UI? If you are trying to use Apple only frameworks, they would inherently be limited to Apple platforms. If you are using something like Swift/Win32, you should be able to just run the application normally.
I would say, you can use Swift on Windows to do real work (use VS Code as IDE on Windows), except the following two points:
- async/await does not work reliably on Windows because of a missing piece in LLVM,
- static linking does not work (yet) on Windows when using the Swift Package Manager, so distribution of a program is a bit more complicated.
(@compnerd: Maybe I am a bit too demanding here, but I think the first issue is really important and pressing.)
The question of a GUI is a more complicated one, Swift/win32 mentioned above does work, and for cross-platform GUIs GTK might be a good choice, but do not expect a „simple“ solution along the lines of SwiftUI for Windows (or Linux) yet.
I agree that it is important, however, the work that I do is a personal time (hobby) project. Maintaining single handedly is not easy (nor sustainable). I would welcome others to help resolve the issue. I've previously pointed out the area in LLVM that this is in (the prologue/epilogue insertion in x86 frame lowering).
I would say that explicitly calling out that this is an X86_64 specific issue. This should not be an issue on ARM64 Windows, though, there are other issues with calling conventions on ARM64 (where SIL itself is unable to properly represent the calling convention for C function calls).
Even with the SPM issue addressed, the runtime distribution would be separate as the static linking of the standard library is not yet supported. There are more issues to be resolved in the compiler for that.