whisker_dev_runtime/lib.rs
1//! Development-only runtime extensions for Whisker.
2//!
3//! Compiled into Whisker apps only when the umbrella crate is built
4//! with `--features hot-reload`. Release builds end up with an empty
5//! crate (no tokio / no WebSocket / no subsecond).
6//!
7//! ## What lives here
8//! - [`hot_reload`]: WebSocket *client* that connects to the
9//! `whisker run` dev server, deserialises incoming `subsecond::JumpTable`
10//! messages, and parks them on a single-slot mutex. The Lynx TASM
11//! thread drains the mutex at the top of every tick and invokes
12//! `subsecond::apply_patch`.
13
14#[cfg(feature = "hot-reload")]
15pub mod hot_reload;
16
17#[cfg(feature = "hot-reload")]
18pub mod log_capture;
19
20#[cfg(feature = "hot-reload")]
21pub use hot_reload::{devlog, start_receiver, take_pending_patch};
22
23#[cfg(feature = "hot-reload")]
24pub use log_capture::start_log_capture;