reis/lib.rs
1//! Reis 🍚 provides a Rust version of EI 🥚 and EIS 🍨 for emulated input on Wayland.
2//!
3//! See the upstream project [libei](https://gitlab.freedesktop.org/libinput/libei) for more information.
4//!
5//! This library is currently **incomplete** and subject to change. It should probably do more to provide a more high level API that handles the things a client/server needs to deal with.
6//!
7//! Setting the env var `REIS_DEBUG` will make the library print ei messages it sends and receives.
8//!
9//! # Features
10//!
11//! `reis` has the following Cargo features:
12//!
13//! - `tokio`: Enables tokio support for clients.
14//! - `calloop`: Enables calloop sources for EIS implementations. Somewhat experimental and
15//! incomplete.
16
17#![forbid(unsafe_code)]
18#![cfg_attr(docsrs, feature(doc_cfg))]
19
20// TODO split up
21
22pub use wire::PendingRequestResult; // XXX types? names?
23pub mod ei;
24mod eiproto_ei;
25mod eiproto_eis;
26mod eiproto_enum;
27pub mod eis;
28mod error;
29pub use error::Error;
30pub mod event; // XXX reorganize?
31pub mod handshake; // XXX ^
32mod object;
33pub mod request;
34pub use object::Object;
35mod util;
36mod wire;
37
38pub use enumflags2;
39
40pub use wire::Interface;
41pub use wire::ParseError;
42
43#[cfg(feature = "async-io")]
44pub mod async_io;
45#[cfg(any(feature = "tokio", feature = "async-io"))]
46mod async_shared;
47#[cfg(feature = "calloop")]
48//#[doc(hidden)] // TODO
49pub mod calloop;
50#[cfg(feature = "tokio")]
51pub mod tokio;
52
53// TODO versioning?
54
55mod private {
56 pub trait Sealed {}
57}