Secondary backend (for Android?)
tannerdsilva opened this issue · 2 comments
I'll preface this issue by saying that I'm not interested in doing anything on Android, this is not in my roadmap at all. I will be writing my first experiments with swift-cross-ui
very soon. For the foreseeable future, I look forward to using only the GTK4 backend, mostly on Linux.
I'll also mention that I don't really know anything about Android development....I have very deep knowledge only in Linux and Apple platforms.
All that being said, I wanted to throw out this project to start any discussions and gauge interest around adding a second backend that appears to work on Android and a few other platforms. (Frankly I'm not even sure we can consider this a full on "backend" but it seems to be pure C, which is ideal for a Swift package).
https://github.com/cnlohr/rawdrawandroid
If anyone has thoughts, considerations, or concerns around anything related to this, I would love to hear it.
I have been thinking about how different backends would be added. rawdraw looks like an interesting library, but given that it’s graphics rather than UI, we’d likely have to implement a lot of stuff to make a good layout system, styling system, renderers for each view, input handling etc. If we were to implement a super custom backend it’d probably be to try and move away from Gtk.
There are other more Gtk-like frameworks (such as Qt) which work on mobile and would be more of a drop-in replacement for Gtk. Those might be better suited to solving Android support than a lower-level graphics lib would be.
SwiftCrossUI supports multiple backends now, and I’m working on an experimental Qt one which may be able to run on Android :)