pub struct DevServer { /* private fields */ }Expand description
The dev loop. Construct with DevServer::new, then drive with
DevServer::run (which returns when the server shuts down).
Implementations§
Source§impl DevServer
impl DevServer
pub fn new(config: Config) -> Result<Self>
Sourcepub fn on_event(self, cb: impl Fn(Event) + Send + Sync + 'static) -> Self
pub fn on_event(self, cb: impl Fn(Event) + Send + Sync + 'static) -> Self
Attach an observer for Events — connect / disconnect /
build progress. The CLI uses this to drive its terminal UI;
other host shells (editor plugins) do their own thing.
Sourcepub async fn run(self) -> Result<()>
pub async fn run(self) -> Result<()>
Bring the dev loop up. The Tier 2 cold rebuild loop:
notify → debounce → cargo build → adb install → relaunch → broadcast “rebuilt” hint over WebSocket.
When hot_patch_mode == Tier1Subsecond, the initial build
also captures rustc + linker invocations through the
whisker-{rustc,linker}-shim binaries, and a Patcher is
initialised from those captures + the original binary’s
symbol table. The change loop then prefers Tier 1
subsecond::JumpTable patches over cold rebuilds for
ChangeKind::RustCode events. Patcher initialisation or
build_patch failure falls back to Tier 2 silently.