How would UIs work on other platforms, though?
How would UIs work on other platforms, though?
I think for right now, you'd have to use the C interop and link against something like GTK or other GUI library. I don't think SwiftUI specifically would ever work well cross-platform, it has so many Apple-isms.
There's also Swift/Win32, but it's MVC. You could also use the interop and use QT as well.
I don't think any of those are necessarily good solutions, but they are there.
Thank you though.
There’s stuff like SwiftCrossUI that does multiple backend bindings
https://github.com/stackotter/swift-cross-ui
And Qt was exploring some bindings using the new C++ interoperability.
https://github.com/ShaftUI/Shaft
Like Flutter, this paints everything itself. It doesn’t need to bind to a UI framework directly. Instead, it needs the platform to provide primitives like a surface to draw into and input events.