Libraries¶
The Mir project is a collection of C++ libraries for writing Wayland compositors. This document describes what those libraries are and how they depend on one another.
Public libraries¶
The following libraries are intended for published for public consumption:
miralmircommonmircoremiroilmirplatformmirservermirwayland
When you build the project, these libraries are found in
<build_directory>/lib.
Additionally, Mir publishes libraries that add support for different platforms.
These can be found in <build_directory>/lib/server-modules. These libraries
are loaded at runtime by Mir and provide access to the underlying graphics and
input hardware of that platform. The libraries that Mir provides are:
graphics-atomic-kmsgraphics-gbm-kmsgraphics-eglstream-kmsgraphics-waylandgraphics-dummyserver-x11server-virtualrenderer-egl-genericinput-evdevinput-stub
Dependency graph¶
In the following diagram, each arrow denotes that the library at the start of the arrow depends on the library at the end of the arrow.
Diagram: A flow chart depicting how the libraries of Mir relate to one another.
classDiagram
mircommon --> mircore
mirwayland --> mircore
miral --> mircore
miroil --> mircore
mirserver --> mircore
InputPlatform --> mircore
DisplayPlatform --> mircore
RenderingPlatform --> mircore
mirwayland --> mircommon
mirserver --> mircommon
miral --> mircommon
miroil --> mircommon
mirplatform --> mircommon
mirserver --> mirwayland
mirserver --> mirplatform
InputPlatform --> mirplatform
DisplayPlatform --> mirplatform
RenderingPlatform --> mirplatform
mirserver --> InputPlatform: dynamically loads
mirserver --> DisplayPlatform: dynamically loads
mirserver --> RenderingPlatform: dynamically loads
miral --> mirserver
miroil --> mirserver
namespace platform {
class InputPlatform
class DisplayPlatform
class RenderingPlatform
}
There are a few things of note in this diagram:
miralandmircoreare intended to be the primary user-facing librariesmiroilis a special compatibility layer for the Lomiri project is not intended for general consumptionmirserverdepends on the most libraries as it is the brains of the operationmircommonprovide common functionalities for every other library in the systemThe input and graphics platforms (represented as
input_Xandgraphics_Xin the diagram) are dynamically loaded bymirserverwhen the engine starts up.