Expand description
§Hojicha Runtime
Event handling and async runtime for Hojicha TUI applications.
This crate provides the runtime infrastructure for handling events, managing async operations, and running the main application loop.
§Core Components
- Program: Main application runtime and event loop
- Event Processing: Priority-based event handling with backpressure
- Async Support: Tokio-based async command execution
- Subscriptions: Stream-based event sources
- Error Resilience: Panic recovery and error handling
§Features
- Priority event queue with automatic scaling
- Resilient input handling with panic recovery
- Safe mutex operations that recover from poison
- Metrics and monitoring support
- Terminal management and restoration
Re-exports§
pub use program::MouseMode;pub use program::Program;pub use program::ProgramOptions;pub use async_handle::AsyncHandle;pub use subscription::Subscription;pub use program::CommandExecutor;pub use program::EventProcessor;pub use program::EventStats;pub use program::FpsLimiter;pub use program::PriorityConfig;pub use program::PriorityEventProcessor;pub use program::TerminalConfig;pub use program::TerminalManager;
Modules§
- async_
handle - Handle for managing cancellable async operations Async operation handle with cancellation support
- metrics
- Advanced performance metrics and percentile latency tracking
- panic_
handler - Global panic handler for graceful TUI recovery
- panic_
utils - Utilities for consistent panic handling across the runtime
- prelude
- Prelude for convenient imports
- priority_
queue - Priority-based event queue with backpressure support
- program
- The main Program struct that runs the application
- queue_
scaling - Auto-scaling functionality for dynamic queue resizing
- resilient_
input - Resilient input handling with panic recovery
- safe_
mutex - Safe mutex wrapper that handles poison errors gracefully
- safe_
priority - Safe priority detection without unsafe transmutes
- stream_
builders - Stream builder utilities for common async patterns
- subscription
- Stream subscription support for async event sources
- testing
- Testing utilities for hojicha applications in the runtime crate
Macros§
- test_
runner - Macro to simplify test setup
Structs§
- KeyEvent
- A keyboard event
- KeyModifiers
- Represents key modifiers (shift, control, alt, etc.).
- Mouse
Event - A mouse event
- Window
Size - Window size information