Go to file
Uli Schlachter 05e5036584 Exit the worker thread when X11Source is dropped
The previous commit added a new worker thread. This thread might sit in
wait_for_event() indefinitely even after the X11Source was dropped. This
is because nothing guarantees that an X11 event will come in "soonish".
And only then would the thread notice that its main thread is gone.

This commit cleans that up by having X11Source explicitly wake up the
event thread and wait for it to exit in its Drop implementation.

Signed-off-by: Uli Schlachter <psychon@znc.in>
2021-08-14 17:37:26 +02:00
.github/workflows CI: structure for running WLCS tests 2021-07-31 20:35:27 +02:00
anvil Exit the worker thread when X11Source is dropped 2021-08-14 17:37:26 +02:00
examples cargo fmt 2021-06-10 22:01:10 +02:00
src wayland.xdg-activation: fix `retain_requests` typo 2021-07-31 22:38:42 +02:00
wlcs_anvil Rework CI flow 2021-07-30 19:29:05 +02:00
.gitignore Fix travis build with updated libinput 2017-12-15 19:22:40 +01:00
.rustfmt.toml Remove unstable rustfmt options 2018-04-17 17:48:20 +02:00
CHANGELOG.md Update CHANGELOG 2021-07-31 21:16:39 +02:00
CONTRIBUTING.md Update IRC reference 2021-06-08 22:05:40 +02:00
Cargo.toml wayland.xdg-activation: Initial implementaion 2021-07-31 21:16:39 +02:00
LICENSE.txt Add MIT license 2017-03-24 10:24:07 +01:00
README.md Update Anvil logind documentation 2021-07-30 10:26:36 +02:00
build.rs add more supported egl platforms 2021-05-15 23:05:26 +02:00
compile_wlcs.sh CI: structure for running WLCS tests 2021-07-31 20:35:27 +02:00
doc_index.html travis: add a redirect doc homepage 2017-10-01 20:34:24 +02:00
matrix_badge.svg Add a few badges on the README 2017-10-04 11:30:07 +02:00

README.md

Smithay

Crates.io docs.rs Build Status Join the chat on matrix at @smithay:matrix.org Join the chat via bridge on gitter at smithay/Lobby

A smithy for rusty wayland compositors

Goals

Smithay aims to provide building blocks to create wayland compositors in Rust. While not being a full-blown compositor, it'll provide objects and interfaces implementing common functionalities that pretty much any compositor will need, in a generic fashion.

Also:

  • Documented: Smithay strives to maintain a clear and detailed documentation of its API and its functionalities. Compiled documentations are available on docs.rs for released versions, and here for the master branch.
  • Safety: Smithay will target to be safe to use, because Rust.
  • Modularity: Smithay is not a framework, and will not be constraining. If there is a part you don't want to use, you should not be forced to use it.
  • High-level: You should be able to not have to worry about gory low-level stuff (but Smithay won't stop you if you really want to dive into it).

Anvil

Like others, Smithay as a compositor library has its own sample compositor: anvil.

You can run it with cargo after having cloned this repository:

cd anvil;

cargo run -- --{backend}

The currently available backends are:

  • --winit: start anvil as a Winit application. This allows you to run it inside of an other X11 or Wayland session.
  • --tty-udev: start anvil in a tty with udev support. This is the "traditional" launch of a Wayland compositor. Note that this requires you to start anvil as root if your system does not have logind available.