4 releases (2 breaking)

0.3.0 Jul 25, 2021
0.2.1 Feb 14, 2020
0.2.0 Jan 3, 2019
0.1.0 Oct 1, 2017

#1248 in GUI

Download history 14/week @ 2024-06-07 13/week @ 2024-06-14 10/week @ 2024-06-21 3/week @ 2024-06-28 4/week @ 2024-07-05 12/week @ 2024-07-12 8/week @ 2024-07-19 34/week @ 2024-07-26 13/week @ 2024-08-02 17/week @ 2024-08-09 15/week @ 2024-08-16 12/week @ 2024-08-23 18/week @ 2024-08-30 12/week @ 2024-09-06 14/week @ 2024-09-13 25/week @ 2024-09-20

71 downloads per month

MIT license

1MB
20K SLoC

Smithay

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 (consolekit support is planned). To use logind, you need to activate the associated cargo feature:

    cargo run --features logind -- --tty-udev
    

Dependencies

~3–15MB
~219K SLoC