@borkdude: Looking at refl I see that the code to compute the classpath is duplicated in bb.edn
and compile.clj
- is there a good way to dry that up?
Presumably it should always run with the same aliases etc
I guess compile.clj
could read the classpath as its sole command-line-arg… I’ll try that
@borkdude: FYI this ⬆️ does seem to work; it’s a possible improvement I could issue a PR if you’re interested.
yeah, I think that makes sense. There is already a classpath
task as well in the bb.edn
which we should feed into this script probably instead of hardcoding it
funny you should mention that; that’s exactly what I did 🙂
but I did it in my project, not your repo.
Wow. That’s neat. Do you see any fundamental limitations at this point?
So this is a real native app, like from Xcode or built from the terminal? What does the process of creating a binary from Clojure code look like? (I have no practical experience with graalvm at the moment)
It's a real native app built with a combination of commands in terminal and xcode. The current process is pretty clunky:
1. Compile java classes for shared library interfaces
2. Build an uber jar
3. run native-image
on the uber jar to produce a shared library
4. Build and run from Xcode
It would be possible to package all these together, but I'm not sure what that should look like.
There are still many limitations, but none of them seem insurmountable if someone was motivated:
• Build process is clunky (see above)
• Foreign function interface to iOS APIs unimplemented (can be automatically generated from https://developer.apple.com/tutorials/data/documentation/technologies.json?language=objc api)
• Long build times
• Repl integration lacking. the babashka remote repl does compile and run. There's still some work to integrate it into a comfortable workflow
• The current setup only builds for device. It should be possible to build for simulator, but I haven't tried it yet. Building for the simulator might not be strictly necessary, but it might be useful.
Does it starts fast :thinking_face: ?
Seems fast to me, but I have no metrics and the todo app I have is pretty dinky.
It would be interesting to compare with a similar app using cljs+react native
does anyone have xcode experience that wants to try it out?