Hacker News new | ask | show | jobs
by navanchauhan 46 days ago
I am finally getting close to my vision of `write once run everywhere with SwiftUI`. The idea is to create a drop-in replacement called OmniUI which will have different renderer backends (I currently have TUI w/ notcurses and Adwaita/GTK working)

s/import SwiftUI/import OmniUI/

As long as you aren't using Apple platform specific libraries like Vision, you should be good for the most part. I am going to make my Gopher browser (https://web.navan.dev/iGopherBrowser/) the first target. I have done some extra stuff like reimplementing CoreData/SwiftData to make it work on Linux.

I am going with Adwaita instead of pure GTK because I like the opinionated approach they have with their design language. I think the reason SwiftUI works is because you can get pretty looking apps without thinking too much.

Projects like adwaita-swift, and swift-cross-ui do exist, but I want my library to be a drop-in replacement. I don't want to be inspired by SwiftUI, I want to use SwiftUI everywhere!

1 comments

Do you have a repo you can share? I'm curious to see.
Technically, it is on GitHub in my swift-omnikit library. But, this library is only meant to be consumed by me for now.

I plan on separating out the UI portions to its own repo and then polish it up