blob: 37090d5929c9a5e3bd20414586159ebfc7e1e094 [file] [log] [blame]
Pekka Paalanen2abe4452015-07-14 13:05:34 +03001 Weston
2 ======
Kristian Høgsberga6f69992010-09-14 12:41:26 -04003
Kristian Høgsberg72e023c2012-07-20 12:26:23 -04004Weston is the reference implementation of a Wayland compositor, and a
5useful compositor in its own right. Weston has various backends that
6lets it run on Linux kernel modesetting and evdev input as well as
7under X11. Weston ships with a few example clients, from simple
8clients that demonstrate certain aspects of the protocol to more
9complete clients and a simplistic toolkit. There is also a quite
10capable terminal emulator (weston-terminal) and an toy/example desktop
11shell. Finally, weston also provides integration with the Xorg server
Bryce Harringtone4cb3c22016-07-07 10:53:17 -070012and can pull X clients into the Wayland desktop and act as an X window
Kristian Høgsberg72e023c2012-07-20 12:26:23 -040013manager.
14
Bryce W. Harringtonc74ab152014-02-03 21:37:06 +000015Refer to http://wayland.freedesktop.org/building.html for building
Kristian Høgsberg72e023c2012-07-20 12:26:23 -040016weston and its dependencies.
Bryce W. Harringtonc74ab152014-02-03 21:37:06 +000017
18The test suite can be invoked via `make check`; see
19http://wayland.freedesktop.org/testing.html for additional details.
Pekka Paalanen2abe4452015-07-14 13:05:34 +030020
Jon A. Cruz179c1862015-07-15 19:22:43 -070021Developer documentation can be built via `make doc`. Output will be in
22the build root under
23
24docs/developer/html/index.html
25docs/tools/html/index.html
26
Pekka Paalanen2abe4452015-07-14 13:05:34 +030027
28
29 Libweston
30 =========
31
32Libweston is an effort to separate the re-usable parts of Weston into
33a library. Libweston provides most of the boring and tedious bits of
34correctly implementing core Wayland protocols and interfacing with
35input and output systems, so that people who just want to write a new
36"Wayland window manager" (WM) or a small desktop environment (DE) can
37focus on the WM part.
38
39Libweston was first introduced in Weston 1.9, and is expected to
40continue evolving through many Weston releases before it achieves a
41stable API and feature completeness.
42
43
Emil Velikov2d01e912016-07-04 15:23:50 +010044API/ABI (in)stability and parallel installability
45-------------------------------------------------
Pekka Paalanen2abe4452015-07-14 13:05:34 +030046
47As libweston's API surface is huge, it is impossible to get it right
Emil Velikov2d01e912016-07-04 15:23:50 +010048in one go. Therefore developers reserve the right to break the API/ABI
Pekka Paalanen2abe4452015-07-14 13:05:34 +030049between every 1.x.0 Weston release (minor version bumps), just like
50Weston's plugin API does. For git snapshots of the master branch, the
Emil Velikov2d01e912016-07-04 15:23:50 +010051API/ABI can break any time without warning or version bump.
Pekka Paalanen2abe4452015-07-14 13:05:34 +030052
53Libweston API or ABI will not be broken between Weston's stable
54releases 1.x.0 and 1.x.y, where y < 90.
55
Emil Velikov2d01e912016-07-04 15:23:50 +010056To make things tolerable for libweston users despite API/ABI breakages,
Pekka Paalanen2abe4452015-07-14 13:05:34 +030057libweston is designed to be perfectly parallel-installable. An
Emil Velikov2d01e912016-07-04 15:23:50 +010058API/ABI-version is defined for libweston, and it is bumped for releases as
59needed. Different non-backward compatible ABI versions of libweston can be
60installed in parallel, so that external projects can easily depend on a
61particular ABI-version. Thus they do not have to fight over which ABI-version
62is installed in a user's system. This allows a user to install many
Pekka Paalanen2abe4452015-07-14 13:05:34 +030063different compositors each requiring a different libweston ABI-version
64without tricks or conflicts.
65
66Note, that versions of Weston itself will not be parallel-installable,
67only libweston is.
68
69For more information about parallel installability, see
70http://ometer.com/parallel.html
71
72
Emil Velikovaa485922016-07-22 14:51:50 +010073Versioning scheme
74-----------------
75
76In order to provide consistent, easy to use versioning, libweston
77follows the rules in the Apache Portable Runtime Project
78http://apr.apache.org/versioning.html.
79
80The document provides the full details, with the gist summed below:
81 - Major - backward incompatible changes.
82 - Minor - new backward compatible features.
83 - Patch - internal (implementation specific) fixes.
84
85
86Forward compatibility
87---------------------
88
89Inspired by ATK, Qt and KDE programs/libraries, libjpeg-turbo, GDK,
90NetworkManager, js17, lz4 and many others, libweston uses a macro to restrict
91the API visible to the developer - REQUIRE_LIBWESTON_API_VERSION.
92
93Note that different projects focus on different aspects - upper and/or lower
94version check, default to visible/hidden old/new symbols and so on.
95
96libweston aims to guard all newly introduced API, in order to prevent subtle
97breaks that a simple recompile (against a newer version) might cause.
98
99The macro is of the format 0x$MAJOR$MINOR and does not include PATCH version.
100As mentioned in the Versioning scheme section, the latter does not reflect any
101user visible API changes, thus should be not considered part of the API version.
102
103All new symbols should be guarded by the macro like the example given below:
104
105#if REQUIRE_LIBWESTON_API_VERSION >= 0x0101
106
107bool
108weston_ham_sandwich(void);
109
110#endif
111
112In order to use the said symbol, the one will have a similar code in their
113configure.ac:
114
115PKG_CHECK_MODULES(LIBWAYLAND, [libwayland-1 >= 1.1])
116AC_DEFINE(REQUIRE_LIBWESTON_API_VERSION, [0x0101])
117
118If the user is _not_ interested in forward compatibility, they can use 0xffff
119or similar high value. Yet doing so is not recommended.
120
121
Pekka Paalanen2abe4452015-07-14 13:05:34 +0300122Libweston design goals
123----------------------
124
Emil Velikov99ac6232016-07-04 15:23:49 +0100125The high-level goal of libweston is to decouple the compositor from
126the shell implementation (what used to be shell plugins).
Pekka Paalanen2abe4452015-07-14 13:05:34 +0300127
Emil Velikov99ac6232016-07-04 15:23:49 +0100128Thus, instead of launching 'weston' with various arguments to choose the
Bryce Harrington585eef32016-07-06 14:50:15 -0700129shell, one would launch the shell itself, e.g. 'weston-desktop',
130'weston-ivi', 'orbital', etc. The main executable (the hosting program)
Emil Velikov99ac6232016-07-04 15:23:49 +0100131will implement the shell, while libweston will be used for a fundamental
132compositor implementation.
133
134Libweston is also intended for use by other project developers who want
135to create new "Wayland WMs".
Pekka Paalanen2abe4452015-07-14 13:05:34 +0300136
137Details:
138
139- All configuration and user interfaces will be outside of libweston.
140 This includes command line parsing, configuration files, and runtime
141 (graphical) UI.
142
143- The hosting program (main executable) will be in full control of all
144 libweston options. Libweston should not have user settable options
145 that would work behind the hosting program's back, except perhaps
146 debugging features and such.
147
148- Signal handling will be outside of libweston.
149
150- Child process execution and management will be outside of libweston.
151
152- The different backends (drm, fbdev, x11, etc) will be an internal
153 detail of libweston. Libweston will not support third party
154 backends. However, hosting programs need to handle
155 backend-specific configuration due to differences in behaviour and
156 available features.
157
158- Renderers will be libweston internal details too, though again the
159 hosting program may affect the choice of renderer if the backend
160 allows, and maybe set renderer-specific options.
161
162- plugin design ???
163
164- xwayland ???
165
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300166- weston-launch is still with libweston even though it can only launch
167 Weston and nothing else. We would like to allow it to launch any compositor,
168 but since it gives by design root access to input devices and DRM, how can
169 we restrict it to intended programs?
170
Pekka Paalanen2abe4452015-07-14 13:05:34 +0300171There are still many more details to be decided.
172
173
174For packagers
175-------------
176
177Always build Weston with --with-cairo=image.
178
179The Weston project is (will be) intended to be split into several
180binary packages, each with its own dependencies. The maximal split
181would be roughly like this:
182
183- libweston (minimal dependencies):
184 + headless backend
185 + wayland backend
186
187- gl-renderer (depends on GL libs etc.)
188
189- drm-backend (depends on libdrm, libgbm, libudev, libinput, ...)
190
191- x11-backend (depends of X11/xcb libs)
192
193- xwayland (depends on X11/xcb libs)
194
Pekka Paalanen2abe4452015-07-14 13:05:34 +0300195- fbdev-backend (depends on libudev...)
196
197- rdp-backend (depends on freerdp)
Pekka Paalanen2abe4452015-07-14 13:05:34 +0300198
199- weston (the executable, not parallel-installable):
200 + desktop shell
201 + ivi-shell
202 + fullscreen shell
203 + weston-info, weston-terminal, etc. we install by default
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300204 + screen-share
Pekka Paalanen2abe4452015-07-14 13:05:34 +0300205
206- weston demos (not parallel-installable)
207 + weston-simple-* programs
208 + possibly all the programs we build but do not install by
209 default
210
211- and possibly more...
212
Emil Velikov2d01e912016-07-04 15:23:50 +0100213Everything should be parallel-installable across libweston major
214ABI-versions (libweston-1.so, libweston-2.so, etc.), except those
215explicitly mentioned.
Pekka Paalanen2abe4452015-07-14 13:05:34 +0300216
217Weston's build may not sanely allow this yet, but this is the
218intention.