dsl: update docs

This commit is contained in:
🪞👃🪞 2025-08-23 12:58:19 +03:00
parent 3e2b07158c
commit 0621793930
4 changed files with 39 additions and 94 deletions

View file

@ -1,15 +1,4 @@
# `tengri_tui`
***tengri_tui*** is an implementation of [tengri_output](../output) and [tengri_input](../input)
on top of [ratatui](https://ratatui.rs/) and [crossterm](https://github.com/crossterm-rs/crossterm).
the `Tui` struct (the *engine*) implements the
`tengri_input::Input` and `tengri_output::Output` traits.
at launch, the `Tui` engine spawns two threads,
a **render thread** and an **input thread**. (the
application may spawn further threads, such as a
**jack thread**.)
all threads communicate using shared ownership,
`Arc<RwLock>` and `Arc<Atomic>`. the engine and
application instances are expected to be wrapped
in `Arc<RwLock>`; internally, those synchronization
mechanisms may be used liberally.
tengri is published under [**AGPL3**](../LICENSE).

View file

@ -7,6 +7,12 @@ mod tui_event; pub use self::tui_event::*;
mod tui_output; pub use self::tui_output::*;
mod tui_perf; pub use self::tui_perf::*;
// The `Tui` struct (the *engine*) implements the
// `tengri_input::Input` and `tengri_output::Output` traits.
// At launch, the `Tui` engine spawns two threads, the render thread and the input thread.
// the application may further spawn other threads. All threads communicate using shared ownership:
// `Arc<RwLock<T>>` and `Arc<AtomicT>`. Thus, at launch the engine and application instances are expected to be wrapped in `Arc<RwLock>`.
pub struct Tui {
pub exited: Arc<AtomicBool>,
pub backend: CrosstermBackend<Stdout>,