The War is Over!

Three big pieces of news came out of Microsoft Build today, and they are welcome pieces of news for me.  The first is that the Mono runtime is being relicensed.  The second is that Xamarin will be made available for free, and become open source over the next few months.  The third is that Unity3D has joined the .NET Foundation.  Combine these together and you have a solution for a war years in the making.

There has been a war between Unity3D and Xamarin for the better part of a decade.  The war revolved around licensing.  Both Xamarin and Unity3D base their products on the Mono runtime, the difference is that Xamarin owns the copyright to it.  A brief history of how things got started goes like this:

  • July 29, 2001:  A small Linux development company named Ximian launches the Mono open source project
  • August 2003: Ximian is acquired by Novell, and assumes control of Mono
  • June 30, 2004: Version 1.0 of Mono is released
  • June 8, 2005: Unity3D 1.0 released, which uses Mono as its scripting backend

Note that the Mono runtime was licensed under the LGPL.  This means that you can use it in your closed source applications, but only if you simply dynamically link against a compiled version.  If you statically link it, or modify it, your changes must be released under a compatible open source license, along with any code that consumes it (sometimes referred to as copyleft).

  • October 3, 2008: Unity3D releases support for iPhone development

This is an important date because Apple does not allow iPhone application developers to utilize dynamic linking.  This means that the Mono runtime must be statically compiled into the application, thus violating the LGPL license.  Either open source their entire product, or work out an agreement with Novell (purchase a commercial license).  They chose the second route, and development continued.

  • April 27, 2011: Novell is acquired by Attachmate, and the lead developer of Mono is laid off.
  • May 16, 2011: The lead developer announces that Mono will be continued to be supported by Xamarin, a company he founded

This caused some turmoil because the Mono team all left Novell and joined Xamarin.  However, Attachmate owned MonoTouch and Mono for Android(the tools for building .NET and compiling C# applications for iOS and Android, respectively) so Xamarin initially announced they would be rewriting them from scratch.  This was bound to cause problems, as it would compete with an existing product that they had insider knowledge of.  Luckily:

  • July 2011: Novell announces that it is granting a perpetual license to Xamarin for the Mono runtime, MonoTouch and Mono for Android and would transfer stewardship of the project to them.

However, this left Unity3D in a bad position.  They had an agreement with Novell, not Xamarin.  For various reasons, an agreement with Xamarin was unable to be reached and Unity3D no longer had access to MonoTouch, Mono for Android, or a static version of the Mono runtime.  They would be able to use the last version of the libraries that Novell developed under the original agreement but would not receive future updates.  So Unity3D essentially forked the Mono project at this point and continued development themselves.

  • September 10, 2013: Apple releases the iPhone 5S, which utilized a new architecture called ARMv8 (or colloquially arm64).  This presented a problem for Unity3D because while they did not have an ARMv8 version of the Mono runtime for their scripting engine, and they could not compile one because of the LGPL license (iOS needs static linking, as noted above).  Luckily, ARMv8 was compatible with ARMv7a instructions so the existing runtime would still function.
  • June 1, 2015: Apple begins requiring 64-bit binaries for apps submitted to the app store.

In between these two bullets, Unity3D realized their predicament and began work on a tool called IL2CPP, which would be a replacement for the Mono runtime.  However, their timeframe may have been slightly unrealistic and adopting it was a somewhat painful process.  Not to mention that not only had the Mono runtime version they had grown stale, but the libraries as well.  This led to Unity3D being unable to keep up with current .NET and C# features.  Currently they are stuck at C# 4, at a .NET framework compatibility of between 2.0 and 3.5.  The community has been very vocal about this.

With the announcement that not only will the Mono runtime be relicensed to MIT (which would allow static linking) but Unity joining the .NET foundation, the problem has been settled because the license restrictions preventing Unity from updating their runtime and libraries is gone.  In my mind this eliminates the need for IL2CPP, but I can see how they might not want the past to repeat itself and keep it open as an option.  I’m excited that the cross platform compatibility of C# is now under one roof instead of three!  This will make my professional life a lot easier.


Leave a Reply

Fill in your details below or click an icon to log in: Logo

You are commenting using your account. Log Out /  Change )

Google+ photo

You are commenting using your Google+ account. Log Out /  Change )

Twitter picture

You are commenting using your Twitter account. Log Out /  Change )

Facebook photo

You are commenting using your Facebook account. Log Out /  Change )


Connecting to %s