blob: 84c30a4caa05e8da21f8a20f7b02e59d834e1db6 [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
Pekka Paalanen72416972016-08-10 14:54:08 +030039Libweston was first introduced in Weston 1.12, and is expected to
Pekka Paalanen2abe4452015-07-14 13:05:34 +030040continue 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
Pekka Paalanen72416972016-08-10 14:54:08 +030048in one go. Therefore developers reserve the right to break the API/ABI and bump
49the major version to signify that. For git snapshots of the master branch, the
50API/ABI can break any time without warning.
Pekka Paalanen2abe4452015-07-14 13:05:34 +030051
Pekka Paalanen72416972016-08-10 14:54:08 +030052Libweston major can be bumped only once during a development cycle. This should
53happen on the first patch that breaks the API or ABI. Further breaks before the
54next Weston major.0.0 release do not cause a bump. This means that libweston
55API and ABI are allowed to break also after an alpha release, up to the final
56release. However, breaks after alpha should be judged by the usual practices
57for allowing minor features, fixes only, or critical fixes only.
Pekka Paalanen2abe4452015-07-14 13:05:34 +030058
Emil Velikov2d01e912016-07-04 15:23:50 +010059To make things tolerable for libweston users despite API/ABI breakages,
Pekka Paalanen72416972016-08-10 14:54:08 +030060different libweston major versions are designed to be perfectly
61parallel-installable. This way external projects can easily depend on a
62particular API/ABI-version. Thus they do not have to fight over which
63ABI-version is installed in a user's system. This allows a user to install many
64different compositors each requiring a different libweston ABI-version without
65tricks or conflicts.
Pekka Paalanen2abe4452015-07-14 13:05:34 +030066
67Note, that versions of Weston itself will not be parallel-installable,
68only libweston is.
69
70For more information about parallel installability, see
71http://ometer.com/parallel.html
72
73
Emil Velikovaa485922016-07-22 14:51:50 +010074Versioning scheme
75-----------------
76
77In order to provide consistent, easy to use versioning, libweston
78follows the rules in the Apache Portable Runtime Project
79http://apr.apache.org/versioning.html.
80
81The document provides the full details, with the gist summed below:
82 - Major - backward incompatible changes.
83 - Minor - new backward compatible features.
84 - Patch - internal (implementation specific) fixes.
85
Pekka Paalanen72416972016-08-10 14:54:08 +030086Weston and libweston have separate version numbers in configure.ac. All
87releases are made by the Weston version number. Libweston version number
88matches the Weston version number in all releases except maybe pre-releases.
89Pre-releases have the Weston micro version 91 or greater.
90
91A pre-release is allowed to install a libweston version greater than the Weston
92version in case libweston major was bumped. In that case, the libweston version
93must be Weston major + 1 and with minor and patch versions zero.
94
95Pkg-config files are named after libweston major, but carry the Weston version
96number. This means that Weston pre-release 2.1.91 may install libweston-3.pc
97for the future libweston 3.0.0, but the .pc file says the version is still
982.1.91. When a libweston user wants to depend on the fully stable API and ABI
99of a libweston major, he should use (e.g. for major 3):
100
101 PKG_CHECK_MODULES(LIBWESTON, [libweston-3 >= 3.0.0])
102
103Depending only on libweston-3 without a specific version number still allows
104pre-releases which might have different API or ABI.
105
Emil Velikovaa485922016-07-22 14:51:50 +0100106
107Forward compatibility
108---------------------
109
110Inspired by ATK, Qt and KDE programs/libraries, libjpeg-turbo, GDK,
111NetworkManager, js17, lz4 and many others, libweston uses a macro to restrict
112the API visible to the developer - REQUIRE_LIBWESTON_API_VERSION.
113
114Note that different projects focus on different aspects - upper and/or lower
115version check, default to visible/hidden old/new symbols and so on.
116
117libweston aims to guard all newly introduced API, in order to prevent subtle
118breaks that a simple recompile (against a newer version) might cause.
119
120The macro is of the format 0x$MAJOR$MINOR and does not include PATCH version.
121As mentioned in the Versioning scheme section, the latter does not reflect any
122user visible API changes, thus should be not considered part of the API version.
123
124All new symbols should be guarded by the macro like the example given below:
125
126#if REQUIRE_LIBWESTON_API_VERSION >= 0x0101
127
128bool
129weston_ham_sandwich(void);
130
131#endif
132
133In order to use the said symbol, the one will have a similar code in their
134configure.ac:
135
Emil Velikov2eda27b2016-08-15 16:31:11 +0100136PKG_CHECK_MODULES(LIBWESTON, [libweston-1 >= 1.1])
Emil Velikovaa485922016-07-22 14:51:50 +0100137AC_DEFINE(REQUIRE_LIBWESTON_API_VERSION, [0x0101])
138
139If the user is _not_ interested in forward compatibility, they can use 0xffff
140or similar high value. Yet doing so is not recommended.
141
142
Pekka Paalanen2abe4452015-07-14 13:05:34 +0300143Libweston design goals
144----------------------
145
Emil Velikov99ac6232016-07-04 15:23:49 +0100146The high-level goal of libweston is to decouple the compositor from
147the shell implementation (what used to be shell plugins).
Pekka Paalanen2abe4452015-07-14 13:05:34 +0300148
Emil Velikov99ac6232016-07-04 15:23:49 +0100149Thus, instead of launching 'weston' with various arguments to choose the
Bryce Harrington585eef32016-07-06 14:50:15 -0700150shell, one would launch the shell itself, e.g. 'weston-desktop',
151'weston-ivi', 'orbital', etc. The main executable (the hosting program)
Emil Velikov99ac6232016-07-04 15:23:49 +0100152will implement the shell, while libweston will be used for a fundamental
153compositor implementation.
154
155Libweston is also intended for use by other project developers who want
156to create new "Wayland WMs".
Pekka Paalanen2abe4452015-07-14 13:05:34 +0300157
158Details:
159
160- All configuration and user interfaces will be outside of libweston.
161 This includes command line parsing, configuration files, and runtime
162 (graphical) UI.
163
164- The hosting program (main executable) will be in full control of all
165 libweston options. Libweston should not have user settable options
166 that would work behind the hosting program's back, except perhaps
167 debugging features and such.
168
169- Signal handling will be outside of libweston.
170
171- Child process execution and management will be outside of libweston.
172
173- The different backends (drm, fbdev, x11, etc) will be an internal
174 detail of libweston. Libweston will not support third party
175 backends. However, hosting programs need to handle
176 backend-specific configuration due to differences in behaviour and
177 available features.
178
179- Renderers will be libweston internal details too, though again the
180 hosting program may affect the choice of renderer if the backend
181 allows, and maybe set renderer-specific options.
182
183- plugin design ???
184
185- xwayland ???
186
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300187- weston-launch is still with libweston even though it can only launch
188 Weston and nothing else. We would like to allow it to launch any compositor,
189 but since it gives by design root access to input devices and DRM, how can
190 we restrict it to intended programs?
191
Pekka Paalanen2abe4452015-07-14 13:05:34 +0300192There are still many more details to be decided.
193
194
195For packagers
196-------------
197
198Always build Weston with --with-cairo=image.
199
200The Weston project is (will be) intended to be split into several
201binary packages, each with its own dependencies. The maximal split
202would be roughly like this:
203
204- libweston (minimal dependencies):
205 + headless backend
206 + wayland backend
207
208- gl-renderer (depends on GL libs etc.)
209
210- drm-backend (depends on libdrm, libgbm, libudev, libinput, ...)
211
212- x11-backend (depends of X11/xcb libs)
213
214- xwayland (depends on X11/xcb libs)
215
Pekka Paalanen2abe4452015-07-14 13:05:34 +0300216- fbdev-backend (depends on libudev...)
217
218- rdp-backend (depends on freerdp)
Pekka Paalanen2abe4452015-07-14 13:05:34 +0300219
220- weston (the executable, not parallel-installable):
221 + desktop shell
222 + ivi-shell
223 + fullscreen shell
224 + weston-info, weston-terminal, etc. we install by default
Pekka Paalanen58f98c92016-06-03 16:45:21 +0300225 + screen-share
Pekka Paalanen2abe4452015-07-14 13:05:34 +0300226
227- weston demos (not parallel-installable)
228 + weston-simple-* programs
229 + possibly all the programs we build but do not install by
230 default
231
232- and possibly more...
233
Emil Velikov2d01e912016-07-04 15:23:50 +0100234Everything should be parallel-installable across libweston major
235ABI-versions (libweston-1.so, libweston-2.so, etc.), except those
236explicitly mentioned.
Pekka Paalanen2abe4452015-07-14 13:05:34 +0300237
238Weston's build may not sanely allow this yet, but this is the
239intention.