View on GitHub

A lightweight alternative to Java

About Avian

PLEASE NOTE: This project is not currently being developed, maintained, or supported.

Avian is a lightweight virtual machine and class library designed to provide a useful subset of Java’s features, suitable for building self-contained applications.

Efficient

The VM is implemented from scratch and designed to be both fast and small.

  • Just-In-Time (JIT) compilation for fast method execution
  • Generational, copying garbage collection ensures short pause times and good spatial locality
  • Thread-local heaps provide O(1) memory allocation with no synchronization overhead
  • Null pointer dereferences are handled via OS signals to avoid unecessary branches

The class library is designed to be as loosely coupled as possible, allowing tools like ProGuard to aggressively isolate the minimum code needed for an application. This translates to smaller downloads and faster startup.

Portable

Platform-specific code is hidden behind a generic interface, so adding support for new OSes is easy. Avian currently supports:

  • Linux (i386, x86_64, ARM, and ARM64),
  • Windows (i386 and x86_64),
  • OS X (i386 and x86_64),
  • iOS (i386, x86_64, ARM, and ARM64), and
  • FreeBSD (i386 and x86_64).

The only third party dependency beyond OS-provided libraries is zlib, which is itself very portable. Although the VM is written in C++, it does not depend on the C++ standard library, and is therefore robust in the face of ABI changes.

Embeddable

Not only can applications embed the VM, but the VM itself supports class and resource loading from embedded jar files. This means you can produce a single executable containing your entire application, thus simplifying the installation process.

Download

Grab the latest code from GitHub

License

Permissive BSD/ISC - style license:

Copyright (c) 2008-2017, Avian Contributors

Permission to use, copy, modify, and/or distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED “AS IS” AND THE AUTHORS DISCLAIM ALL WARRANTIES WITH REGARD TO THIS SOFTWARE INCLUDING ALL IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS. IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY SPECIAL, DIRECT, INDIRECT, OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.