8bf7d91f98
`DrmNode` was made to manage open drm nodes (including render nodes) without having to create a `DrmDevice`. Even if opening render nodes *should* work in general on most systems, the user should be in charge of opening device, because they *may* want to use a `Session` or something else. Therefor remove all `open` calls from drm/node. The X11-backend, which tries to optain a render node, now opens the render node itself, if getting a path proves to be successful. |
||
---|---|---|
.github/workflows | ||
anvil | ||
examples | ||
src | ||
wlcs_anvil | ||
.gitignore | ||
.rustfmt.toml | ||
CHANGELOG.md | ||
CONTRIBUTING.md | ||
Cargo.toml | ||
LICENSE.txt | ||
README.md | ||
build.rs | ||
compile_wlcs.sh | ||
doc_index.html | ||
matrix_badge.svg |
README.md
Smithay
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:
--x11
: start anvil as an X11 client. This allows you to run the compositor inside an X11 session or any compositor supporting XWayland. Should be preferred over the winit backend where possible.--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.