widgetkit_runtime/lib.rs
1//! Lifecycle-driven runtime for WidgetKit v0.1.
2//! The current runtime scope is intentionally a single widget instance per app/host pair.
3//! All timers and background tasks belong to that widget instance and are shut down with it.
4//! Rendering is demand-driven: hosts redraw only after the runtime requests it.
5
6mod app;
7mod context;
8mod event;
9mod host;
10mod internal;
11mod scheduler;
12mod tasks;
13mod widget;
14
15pub use app::{AppRunner, WidgetApp};
16pub use context::{DisposeCtx, MountCtx, RenderCtx, StartCtx, StopCtx, UpdateCtx};
17pub use event::Event;
18pub use host::HostRunner;
19pub use scheduler::Scheduler;
20pub use tasks::Tasks;
21pub use widget::Widget;
22
23pub use widgetkit_core;
24pub use widgetkit_render;
25
26// TODO(v0.2): harden widget instance generation guards across restart/reload boundaries
27// TODO(v0.7): allow lifecycle integration with hybrid/native-web host
28// TODO(v0.8): support restart-safe instance isolation guarantees
29// TODO(v0.2): named task handles
30// TODO(v0.2): task cancellation tokens
31// TODO(v0.8): structured concurrency/task groups debug inspection
32// TODO(v0.8): expose task diagnostics/devtools hooks
33// TODO(v0.3): debounce/throttle helpers
34// TODO(v0.8): virtual time/testing scheduler
35
36#[cfg(test)]
37mod tests;