Hi. I'm getting started on a project that will have iOS/Android/Web/Raspberry Pi apps. I've browsed this thread and I like what I see, but have a few questions. (in the thread)
The nature of the app isn't particularly important, but I want to reuse as much code as possible between apps. I'm familiar with Clojure(Script) and am wondering if I should build shared code with it compiling it with GraalVM (for size/speed advantages mostly). So for those of you who have used built GraalVM mobile apps is this something you would recommend? Are there any hiccups I'd need to worry about? If I don't use Clojure I still want something that targets the LLVM for the common code but I have very little experience with C++/Rust/etc. and I'd rather use Clojure (because I like it more) but don't want to just end up dealing with a lot of integration headaches. I guess, how pleasurable is writing for mobile with Clojure/GraalVM?
Afaik, targeting iOS and android with graalvm native image is still pretty rough around the edges. I don't think oracle officially supports iOS or android. Gluon supports mobile, but I can't tell if their fork works with the latest versions of graalvm. I've been using this fork from 2022 on iOS, https://github.com/gluonhq/graal/releases/tag/gluon-22.1.0.1-Final. I've tried newer versions, but they failed (I don't remember the exact details off the top of my head). Another issue with cross platform builds is finding a cross platform UI library. Sharing UI code across iOS and android is generally a mess, but I don't think using native image helps much here. You may have better luck checking out #clojuredart. Having said that, connecting to a live repl on your phone and hacking away on an app is great for hobby projects. I wrote my own podcast app and use it several times a day. It has features tailored to me that I don't think I would find from an app in the app store. Maybe with enough effort, it could also be used for more serious projects, but I think using clojure+native-image for mobile apps is still experimental for now.
Hm, that’s about what I expected. I have been planning to use native (Swift/Kotlin) for the UI elements and only do logic that’s the same between them (like saving to a DB) in the GraalVM. I’ll keep researching. Thanks for the input.