Skip to main content

clawdesk-bus

The event bus crate provides internal publish/subscribe messaging between ClawDesk subsystems.

What It Does (Plain English)

Think of it as an internal postal system. When something important happens somewhere in ClawDesk (like a new message arriving), the bus broadcasts it so other parts of the system can react — without those parts needing to know about each other directly.

Key Concepts

  • Events — Typed messages broadcast through the bus
  • Publishers — Components that emit events (e.g., "new message received")
  • Subscribers — Components that listen for specific events and react
  • Topics — Categories of events for filtering

Architecture Role

LayerPosition
InfrastructureInternal communication backbone

Dependencies

  • clawdesk-types — Event type definitions
  • tokio — Async broadcast channels