0140de89fb
This commit removes some clippy warnings (to advance #45) by doing the following: - replace usage of `mem::uninitialized()` with `MaybeUninit` - replace usage of `nix::libc::{uint64_t, int32_t}` with `{u64, i32}` - replace functions inside of `Option::ok_or` with `Option::ok_or_else` - replace functions inside of `Result::unwrap_or` with `Result::unwrap_or_else` - replace occurrences of pass-by-reference with pass-by-value when appropriate - replace unused variables in pattern-matching with wildcards - replace `match` expressions that have only one case with `if let` expressions - replace UpperCamelCase names of consts with SCREAMING_SNAKE_CASE - remove `clone()` on types that implement Copy - remove redundant imports - remove `fn main()` from doctests - remove let binding for variables that are returned afterwards |
||
---|---|---|
anvil | ||
examples | ||
src | ||
.gitignore | ||
.rustfmt.toml | ||
.travis.yml | ||
CHANGELOG.md | ||
CONTRIBUTING.md | ||
Cargo.toml | ||
LICENSE.txt | ||
README.md | ||
build.rs | ||
doc_index.html | ||
matrix_badge.svg | ||
vagga.yaml |
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 functionnalities 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 functionnalities. 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