Ok, so we have made the first beta of Elements 8.4 available, and understandably, "Island" is the new feature you are most excited and want to hear more about.

So, What is Island?

"Island" is a new target platform for the Elements compiler, the fourth after .NET ("Echoes"), Java ("Cooper") and Cocoa ("Nougat").

Island really is a set of platforms, as it does not target only one operating system, but three.

It is what all our friends over in the Delphi community have been asking us to do since, oh, 2005: It's a new CPU-native compiler that will let you compile Oxygene, C# and Swift code right to the machine code level, for different platforms:

Island (right now) lets you build native 32-bit and 64-bit Windows executables against the Win32 API, as well as native 64-bit Linux executables for Linux's standard APIs.

Eventually, Island can and will also support other CPU architectures on Windows and Linux (for example ARM), and will also support building native Darwin (i.e. the operating system that underlies all of Apple's platforms) as third target platform, as well.

How Does Island Work?

As said before, Island is a "native" compiler that compiles directly to CPU code – in that sense, it is much like our existing "Nougat" platform for Cocoa. Like Nougat, Island also uses LLVM (and LLD) on the back end to generate that code, and of course Island supports all three of our front-end languages – Oxygene, C# and Swift.

Infrastructure wise, there are more similarities between Island and Nougat, so if you have already been using Elements for Cocoa, you have a bit of a head start:

For example, Island uses the same .fx format you are already familiar with, for references. Right now, Island ships with three .fx files for each platform:

  • rtl.fx is the base operating system RTL. This encompasses what you may think of as the "C runtime" APIs, as well as the core operating system API – for Windows, that's all of the Windows ("Win32") API (for example CreateWindowEx), and for Linux and Darwin it's the corresponding core OS APIs on that platform (say, fopen()).

Unlike say Delphi, Island does not use manually generated import units for these APIs but – similar as on Cocoa – we're automatically consuming the C headers provided by the platform. Every API is available by default, and you'll be able to import your own with FXGen.

  • Island.fx contains our own higher-level API and language support. This includes things such as the cross-platform String datatype, etc. It's to Island what libNougat is to Nougat, although it needs to reach to a lower level to provide its functionality, because a lot that we take for granted on the higher-level platforms (such as a flexible String type, collections, or indeed even a base Object type) does not exist at the level Island sits on.
  • gc.fx, lastly, implements the Garbage Collector for Island.

Of course, in the long run, there will be more libraries. There'll be Swift.fx for the Swift Base Library Support, there'll be Sugar.fx, and there'll be other higher-level OS API libraries.

What Works Now, What Does Not?

Remember that this is the very first of many many beta drops. Island is far from done, a lot of work remains, and some things you see will change between now and the final release.

That said, in the current beta drop, Island is basically usable for several things:

  • You can create console apps for Windows and Linux, leveraging all the standard "C RTL" functions you'd expect, as well as all the platform-specific core OS APIs.

  • A basic cross-platform class/object model exists based on RemObjects.Elements.System.Object defined in Island.fx, designed for compatibility with the three existing platforms.

  • In Visual Studio you can create, build and run/debug both Windows and Linux projects (debugging on Linux works remotely via "CrossBox 2"); building happens all locally.

  • In Fire, you can create and build Windows and Linux projects locally. (Remote deployment and debugging is not hooked up in Fire yet, sorry. Hopefully for the next beta.)

  • We have templates for Console App and Class Library, for all three platforms.

<img src="/content/images/2016/05/Screen-Shot-2016-05-18-at-8-27-24-AM.png" width="389")

What does not work yet? Pots of stuff. Oodles. Including:

  • There's no Swift.fx yet, so if you're using Swift, you'll be missing APIs and types that come from that, such as print() or []-style arrays. Patience. ;)

  • There's no Sugar.fx yet, so you'll want to hold off porting that big cross-platform code base to Island just yet.

  • Island.fx is still a work in progress. A lot of core functionality's there, but a lot is missing, too. Not all of it will work reliably yet, and some API parts may change.

  • Debugging is still rough (and not available in Fire at all, mainly due to lack of CrossBox 2 being hooked up in Fire yet).

That said, here's to writing your first native Win32 app:

Get the Elements 8.4 Beta Now!

Remember, the Elements 8.4 Beta is available to all subscribers, and Island is just one of many new exciting things coming in 8.4. If you are an active subscriber, go check out the beta now. And if you're not – what are you waiting for buy or renew your Elements license, today!