crates/tui/src/lib.rs 1.0 KiB raw
1
//! Small immediate-mode terminal UI library.
2
//!
3
//! The default crate surface re-exports the core rendering primitives from
4
//! `rustik_tui_core`: buffers, styled text, layout, app/runtime traits, terminal
5
//! backends, and small layout widgets. Enable the `widgets` feature to also
6
//! re-export the higher-level widgets from `rustik_tui_widgets`.
7
//!
8
#![deny(unsafe_code)]
9
#![warn(missing_docs)]
10
#![warn(clippy::unwrap_used)]
11
12
pub use rustik_tui_core::*;
13
14
/// Higher-level widgets re-exported when the `widgets` feature is enabled.
15
#[cfg(feature = "widgets")]
16
pub mod widgets {
17
    pub use rustik_tui_widgets::*;
18
}
19
20
#[cfg(feature = "widgets")]
21
pub use rustik_tui_widgets::*;
22
23
#[cfg(test)]
24
mod tests {
25
    #[test]
26
    fn facade_reexports_core_primitives() {
27
        let _ = crate::Buffer::empty(crate::Rect::new(0, 0, 1, 1));
28
    }
29
30
    #[cfg(feature = "widgets")]
31
    #[test]
32
    fn widgets_feature_reexports_widget_types() {
33
        let _ = crate::List::new([crate::Line::new("row")]);
34
        let _ = crate::Viewport::new();
35
    }
36
}