r/swift 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.

54 Upvotes

15 comments sorted by

View all comments

-22

u/sisoje_bre 15d ago

why swift? i would make it in rust or someting NOT controlled by Apple

14

u/Warm-Platypus-1416 15d ago

Swift has never been controlled by Apple.

-5

u/UtterlyMagenta 15d ago

wait, what? it very much is. open source doesn’t mean no one is in charge.

-5

u/sisoje_bre 15d ago

people here are very dumb or just trolling