fn run( viewer: Viewer, sink: Arc<dyn Fn(Event) + Send + Sync>, rx: Receiver<Msg>, )
The engine loop: apply messages and publish the view state when it changed.