Skip to main content

Command Palette

Search for a command to run...

Switaculous - SwiftUI on Windows and Linux!

Updated
•2 min read•View as Markdown
Switaculous - SwiftUI on Windows and Linux!
K
On kevincoder.co.za, I write about my journey as a developer working across Django, Go, and everything in between, from large-scale systems to small, useful tools. Programming has been my passion for about 2 decades now, and I'm still loving it, so I experiment a lot and sometimes write about it.

I've been doing some mobile dev recently; I really like SwiftUI's declarative style of building apps, but I'm using React Native because I need cross-platform support.

Nonetheless, I wanted to explore SwiftUI; I tried the playground on my iPad, but it's kinda weird typing on that touchscreen keyboard, so this got me thinking: can't we just build, or at least experiment with Swift and SwiftUI on other platforms like Windows or Linux?

Naturally, Apple won't allow this, and I'm not trying to violate their T&C's or allow people to "hack" their way into the App Store, but surely as a learning tool, it should be kinda okay to allow a Playground-type app on Windows.

So, with a lot of help from Claude 5.5 Opus, I got crafting and built "Switaculous". Now, building an interpreter is not beyond me, but it would take months to get it working right; thanks to Claude, this is now possible within days!

Switaculous is a Golang-powered desktop app that renders a code editor in your browser; it includes support for most SwiftUI widgets and even supports SwiftData.

This is a custom-built interpreter from scratch in Go; it's not meant to be 100% compatible with Xcode or for building real-world applications. It's for purely educational purposes, so please do not expect to design a UI here and then publish it to the App Store.

However, the code is mostly compatible with Swift and Swift UI, so for most widgets or ui components, you can literally copy and paste this code into Xcode, and it should run the same, and vice versa.

It might even be possible to use this as a fast prototyping tool to design your UI, then just open the project in Xcode to actually build out the full app later.

Sounds interesting? Go grab your copy here: https://github.com/kevincoder-co-za/switaculous/releases/tag/v0.0.1