SwiftUI for Linux, Windows and Web -- Still Experimental

SwiftOpenUI is a cross-platform SwiftUI framework that lets you write SwiftUI code once
and run it natively on macOS, Linux, Windows, and the Web. No Electron, no webview
wrappers — each platform renders through its own native toolkit: GTK4 on Linux,
Win32/Direct2D on Windows, and DOM/Canvas on the Web via WebAssembly.

If you've ever wished you could take your SwiftUI skills beyond Apple's ecosystem, this
is that project. The API surface is real SwiftUI — @State, @Binding, NavigationStack,
.animation(), ForEach, the whole pattern. On macOS, your code compiles against actual
SwiftUI to validate API compatibility. On other platforms, SwiftOpenUI provides the same
protocols, property wrappers, and view types backed by platform-native rendering.

The framework currently implements 43 views (Text, Button, TextField, Toggle, Slider,
List, Grid, TabView, NavigationSplitView, Canvas, and more), 36 modifiers, and full state
management (@State, @Binding, @ObservedObject, @StateObject, @EnvironmentObject,
@Observable). Linux and Windows are at ~95% feature parity. The Web backend is at ~95%
and runs entirely in the browser via Swift-to-Wasm compilation.

SwiftOpenUI is MIT-licensed and designed for contributors. Every implemented feature is
tracked in a parity matrix, and the repo includes 14 runnable examples with automated
screenshot comparison across all four platforms. Adding a new view means defining one
struct in core and one rendering extension per backend — the architecture is clean and
approachable.

If you're a Swift developer who's been waiting for SwiftUI to go cross-platform, give it
a try: git clone, swift run ColorMixer, and see it render on your machine.

11 Likes

I am particularly interested in a solution that enables GUI development on Windows using Swift.

You mention "Still Experimental," yet on GitHub, you list the status for Windows as "Production." Could you please provide further details?

I am also interested in a comparison between SwiftOpenUI and swift-cross-ui
( GitHub - moreSwift/swift-cross-ui: A cross-platform declarative UI framework, inspired by SwiftUI. · GitHub ) for GUI development on Windows. For instance, I notice that SwiftOpenUI uses Win32 rather than WinRT/WinUI 3. What are the implications and limitations of this?

Clearly, production is overstated. I need to review many, including documentation. But thanks to point out.

I’m also interested in using SwiftUI on other platforms, but I am a bit concerned to see this project is only 4 days old and has 230 commits which list Claude as a co-committer. Is this all AI-generated?

1 Like

I was working two project separately:

i was wondering those two can combined into one, yes, most coding work is done by claude, but when claude cannot solved or stack, then codex or me helped the way out.

Although most of code is done by claude, but most of coding are reviewed by Codex and Gemini, esp Codex is a super tough, ahem nasty, ahem good reviewer. I was able to focus on project direction.

I don’t have physical Windows PC or Linux machine, I use Mac with UTM virtual environment for Windows (arm64 version) and Ubuntu (arm64 version), so i did not try test on x86 environment.

I did not expected that Claude, Codex, Gemini can destroy, ahem change software development industry, but I realized that directing agents are still very hard, they can write 300 times faster coder. In early stage, I thought I can write 30% better code than Claude code, but when I see huge wave of sufficient, ahem good code, 30% better quality code is nothing.

So they keep writing code super fast. I cannot even review all code in my eye, but surprisingly, Codex doing very picky, ahem good review so I barely catch up with 300 times coding speed.

This can be my experimental project how software development business extinct, ahem change.

FWIW I think there is also a project called OpenSwiftUI that is working on macOS but not Linux yet.

As for using GTK+ in SwiftOpenUI it is probably more stable than Qt6 but I wonder whether it will support animations like people expect these days, as well as some advanced features that Qt6 has like the PDF viewer and media player.


Still not ready for production, but it start shaping up, I made Mac Paint like simple Paint Application for SwiftOpenUI, it should work on Windows, Linux, but not tested on Web (wasm) That was fun!