Scala on iOS using Avian

There is a relatively new lightweight JVM called Avian that can create executable files for iOS purposes.

There is not much documentation on the site (and not much can be found on Google). I was wondering if anyone knew of a step-by-step guide on how to get the base Scala program running on iOS using Avian .

+60
scala ios iphone jvm avian
Dec 03
source share
4 answers

Another alternative iOS JVM compiler is RoboVM . Although this is an early stage, it looks pretty promising, with examples on how to compile Scala for iOS.

EDIT This was an old answer, valid at the time, but as @JamesMoore notes, RoboVM is gone. Now it looks very promising and there may well be a way to run Scala code in iOS in the near future Scala Native

+7
Jul 30 '13 at 2:04 on
source share

Scala compiled sources are completely standard class files. You should be able to follow the instructions (look for "Embedding") on the website without major changes, just consider scala-library.jar as a dependency on your code.

I managed to load the source compiler and the standard library launched on Avian a few days ago.

Some parts may be a little rough around the edges, for example. There is one mandatory fix that will be part of the next version of Scala (2.10.1), but not in 2.10.0. If you want to play with him right now, you need to use the nightly build until 2.10.1 is released.

If you have additional problems, report it!

+4
04 feb. '13 at 22:15
source share

I may not need it anymore, now Oracle is making JavaFX open source on iOS and Android !

EDIT: Oracle updated the article to announce that they will not release the JVM, so it looks like JavaFX + Avian might be the way to go.

+3
Feb 11 '13 at 22:54
source share

Running Java byte code on iOS (not root) not only works with this, but also with the JVM. As far as I understand, iOS memory management does not allow to write executable memory pages in user mode. This basically disables JIT compilation. Therefore, even if you can run some compiled classes (with Java or Scala) on a specific Java virtual machine, I would carefully check how this virtual machine supports Ahead-Of-Time compilation to be run on iOS. As I saw, Avian AOT works well on the desktop. For iOS, you will have to test it yourself, although the project looks promising in the area of ​​AOT.

+2
Apr 16 '13 at 16:34
source share



All Articles