BT

Facilitating the Spread of Knowledge and Innovation in Professional Software Development

Write for InfoQ

Topics

Choose your language

InfoQ Homepage News Lightweight, Embeddable VM Avian Supports 64-Bit iOS Devices

Lightweight, Embeddable VM Avian Supports 64-Bit iOS Devices

This item in japanese

Avian is a lightweight, portable, embeddable virtual machine that aims to support a reduced subset of Java on iOS alongside Linux, FreeBSD, and Windows. Version 1.2 added support for ARM64 on Linux and iOS.

Avian is mostly meant to allow developers to deploy self-contained applications that embed the virtual machine as well as any jar files providing additional classes and resources. Avian is based on a Just-In-Time compiler (JIT). In case of iOS, the JIT compiler is run ahead of time (AOT) to comply with the platform’s requirement of only running code that has been signed – so, no code generation is possible on-the-fly.

According to Joshua Warner, one of Avian core contributors, Avian is especially suited to enterprises that “don’t want to roll out Java across all of their clients machines”, possibly due to the lack of sufficient privileges. In such scenario, Avian will be a suitable way to deploy the same code on a number of platforms. Admittedly, Avian is not going to compete with the likes of HotSpot, or RoboVM, in terms of performance.

Though aimed to be ligthweight, Avian can be built to use the OpenJDK class library instead of Avian’s default library. This can be useful if an application requires a feature that is not available in Avian’s default library.

Niklas Therning @ntherning, co-founder of RoboVM, provided an useful comparison between RoboVm and Avian:

  • RoboVM is more aggressivley targeting iOS, while Avian strives to be more cross-platform;
  • RoboVM provides a custom bridge to Cocoa Touch, bro, that, RoboVm says, provides a faster mechanism than JNI.
  • Additionally, RoboVM uses LLVM internally to generate machine code and benefits from many optimizations “for free”.

Another major difference between RoboVM and Avian ensued from the recent close-sourcing of RoboVM following Xamarin’s acquisition. Avian is open source and available on GitHub.

Rate this Article

Adoption
Style

BT