smithay/src/lib.rs

60 lines
1.4 KiB
Rust
Raw Normal View History

#![warn(missing_docs)]
2017-04-15 10:54:37 +00:00
//! **Smithay: the wayland compositor smithy**
//!
//! Most entry points in the modules can take an optionnal `slog::Logger` as argument
//! that will be used as a drain for logging. If `None` is provided, they'll log to `slog-stdlog`.
2017-03-11 08:15:17 +00:00
#![cfg_attr(feature = "clippy", feature(plugin))]
#![cfg_attr(feature = "clippy", plugin(clippy))]
2017-09-18 14:58:20 +00:00
// `error_chain!` can recurse deeply
#![recursion_limit = "1024"]
2017-03-11 08:15:17 +00:00
extern crate image;
2017-02-20 21:32:03 +00:00
extern crate nix;
2017-06-10 20:59:59 +00:00
#[macro_use]
extern crate rental;
2017-09-05 17:50:22 +00:00
extern crate tempfile;
extern crate wayland_protocols;
extern crate wayland_server;
extern crate xkbcommon;
#[cfg(feature = "backend_drm")]
extern crate drm;
#[cfg(feature = "backend_drm")]
extern crate gbm;
2017-04-14 22:23:03 +00:00
#[cfg(feature = "backend_libinput")]
extern crate input;
2017-09-05 17:50:22 +00:00
#[cfg(feature = "backend_winit")]
extern crate wayland_client;
#[cfg(feature = "backend_winit")]
extern crate winit;
2017-03-07 10:53:57 +00:00
2017-05-18 20:28:02 +00:00
extern crate libloading;
2017-03-18 16:26:22 +00:00
#[cfg(feature = "renderer_glium")]
extern crate glium;
2017-02-22 10:00:03 +00:00
#[macro_use]
extern crate slog;
extern crate slog_stdlog;
2017-09-18 14:58:20 +00:00
#[macro_use]
extern crate error_chain;
2017-03-07 10:53:57 +00:00
pub mod backend;
pub mod compositor;
2017-06-04 15:47:37 +00:00
pub mod shm;
2017-09-21 17:42:19 +00:00
pub mod seat;
2017-09-20 13:03:39 +00:00
pub mod shell;
2017-09-22 08:46:00 +00:00
pub mod utils;
fn slog_or_stdlog<L>(logger: L) -> ::slog::Logger
2017-06-20 09:31:18 +00:00
where
L: Into<Option<::slog::Logger>>,
{
use slog::Drain;
2017-09-05 17:50:22 +00:00
logger
.into()
.unwrap_or_else(|| ::slog::Logger::root(::slog_stdlog::StdLog.fuse(), o!()))
}