Mir, miral, miroil - how do they relate
Someone starting their journey into Mir asked me how the names “miral” and “miroil” they keep seeing relate to Mir. Good question!
I thought I’d share the answer here…
History
A long time ago Mir was part of an ambitious attempt to build a vision: a universal computing experience (called “convergence”).
“Convergence” would mean that graphical shells and applications would adapt to the hardware they are running on. A phone, a desktop setup with banks of monitors, or a virtual reality rig would run the same apps and the same shell and everything would adapt to the display and input capabilities available. Plugging or unplugging hardware would be seamlessly managed.
miral
The graphical shell that would handle this was called Unity8 and was based on Mir. Building both of these components at the same time led to some difficulties, one of which was that Mir wasn’t ABI or API stable. We worked with with this by landing conditionally compiled code into Unity8 to handle the changes but it wasn’t a great experience.
Out of frustration I started a “Mir Abstraction Layer” project that was designed to provide the Mir features needed by a compositor in an ABI stable way. That was miral, and was later folded into the Mir project proper and the old APIs deprecated.
miroil
Later, but still some years ago, Canonical abandoned the dream of building “convergence” and with it many projects including Unity8. But Unity8 didn’t die, it was picked up by the community and renamed Lomiri.
Before Canonical abandoned Unity8 @greyback and I had been working on “porting” Unity8 to miral. But this wasn’t completed. Lomiri still depended upon some of the old Mir APIs that had no equivalent in miral.
Now, as time passed, the Mir team needed to drop the old APIs only a few of which were really needed by Lomiri. So, miroil was born - a stopgap library to maintain compatibility with Lomiri. (It’s an anagram of Lomiri.)
The present
The principle API for building compositors with Mir is miral. The old mirserver API has gone, and the miroil APIs are deprecated (but maintained to support Lomiri).
The future
We want Mir to provide better APIs than miroil that cover the same features. But these better APIs are not designed yet. Once those APIs exist we will liaise with the Lomiri developers about removing Miroil