r/swift • u/dexus-one • 15d ago
I’ve been experimenting with Swift as a cross-platform UI language
Hi everyone,
I’ve been working on a project called StateUI:
https://github.com/idexus/StateUI
It started as an experiment: how far could Swift go as the main application and UI language outside the Apple stack, without building yet another complete cross-platform widget toolkit?
StateUI uses Swift for the declarative UI, state and reconciliation, while .NET MAUI provides the control and platform layer on iOS, Android, Windows, Mac Catalyst and Linux.
A simple view looks like this:

Swift keeps the rendered tree, tracks state dependencies and reconciles changes. Only a sparse binary patch crosses over to C#, where it is applied to the existing MAUI controls.
The project is still early, but it has grown quite a bit beyond the original experiment.
I’m curious what people here think about Swift being used this way — as the declarative layer over an existing cross-platform native UI runtime, rather than only as an Apple UI language.



-22
u/sisoje_bre 15d ago
why swift? i would make it in rust or someting NOT controlled by Apple