Bluebonnet, light-weight .NET on Java

Bluebonnet is a partial implementation of the .NET platform on top of the Java Virtual Machine, and compatible with Android runtime. The Bluebonnet bytecode compiler translates .NET CIL into Java bytecode in Java classes, and additional run-time support is provided by the Baselib library.

The Bluebonnet platform is compatible with Java on all API levels of the Android platform. This means Android apps can be written in languages such as C# and F#. After conversion, they run as 100% Java code on Android, with no native code libraries. They require only a thin, light-weight support library — the Baselib library.

The Baselib library is itself written in C# and compiled to Java using Bluebonnet. It provides support for .NET features such as types (primitive types, value types, generic types), reflection, collections, and some basic functionality from the .NET Base Class Libraries (BCL).

It should be emphasized that Bluebonnet does not aim to be a full implementation of .NET, and that large parts of the standard .NET libraries are not implemented in Baselib at this time. Having said that, it is possible to create simple Android apps with Bluebonnet. For an example, take a look at the Unjum proof-of-concept game (also on Github).

This game relies on BNA (Github link), which is a partial implementation of the XNA 4 library for Android. The game was developed in F# in Visual Studio on Windows using the original implementation of XNA 4 from Microsoft. Then the game binary was run through Bluebonnet, combined with BNA (as well as with Baselib and the F# core library) and packaged into an APK, ready to run on Android.

For more information, and to download Bluebonnet, please visit the Bluebonnet Github page.