Skip to main content

rlvgl_playit/
lib.rs

1//! Mini-playwright test driver for rlvgl.
2//!
3//! `rlvgl-playit` provides input injection, widget queries by tag, and
4//! framebuffer pixel inspection over a pluggable transport (serial, in-process,
5//! etc.).
6//!
7//! # Architecture
8//!
9//! ```text
10//! test host                       target / simulator
11//! ──────────                      ──────────────────
12//! "T100,200\n"  ──► transport ──► PlayitExecutor::poll()
13//!                                   ├─ parse_command()
14//!                                   ├─ EventSpec → Event
15//!                                   ├─ WidgetNode::dispatch_event()
16//!                                   └─► "OK\r\n" ──► transport ──► host
17//! ```
18//!
19//! # Modules
20//!
21//! | Module | Purpose |
22//! |--------|---------|
23//! | [`command`] | Command, EventSpec, KeySpec, QuerySpec, DumpSpec, TouchPointSpec |
24//! | [`response`] | Response, StatusData |
25//! | [`protocol`] | Text wire codec (parse / format) |
26//! | [`transport`] | `PlayitTransport` byte-level I/O trait |
27//! | [`executor`] | `PlayitExecutor`, `EventPipeline` — main poll loop + gesture routing |
28//! | [`recorder`] | `EventRecorder` — timed input capture for replay |
29//! | [`tag`] | `find_by_tag` / `find_by_tag_mut` tree walkers |
30//! | [`framebuffer`] | `FramebufferReader` pixel inspection trait |
31//! | [`tcp`] | Loopback TCP transport for simulator / host automation (`std`) |
32//!
33//! # `no_std` support
34//!
35//! The crate is `no_std`-compatible by default with no allocator required.
36//! Enable `alloc` for heap-backed helpers or `std` for standard-library
37//! integrations.
38#![cfg_attr(not(any(test, feature = "std")), no_std)]
39#![deny(missing_docs)]
40
41pub mod command;
42pub mod executor;
43pub mod framebuffer;
44pub mod protocol;
45pub mod recorder;
46pub mod response;
47pub mod tag;
48#[cfg(feature = "std")]
49pub mod tcp;
50pub mod transport;
51
52pub use command::{
53    Command, DumpSpec, EventSpec, KeySpec, QuerySpec, TouchPointSpec, TouchStateSpec,
54};
55pub use executor::{EventPipeline, PlayitExecutor};
56pub use framebuffer::FramebufferReader;
57pub use recorder::{EventRecorder, RecordEntry};
58pub use response::{Response, StatusData};
59pub use tag::{find_by_tag, find_by_tag_mut};
60#[cfg(feature = "std")]
61pub use tcp::TcpServerTransport;
62pub use transport::PlayitTransport;