ioevent-0.1.0-rc.1 has been yanked.
IOEVENT
Transform Any tokio Async I/O into Event-Driven Architecture with Low Overhead.
A lightweight Rust crate built on Tokio's async runtime, providing a flexible event bus abstraction for asynchronous I/O operations. Perfect for building decoupled, event-driven systems with optimized performance.
Features ✨
- 🚀 Event-driven Architecture: Convert async I/O operations into unified event streams
- 🔗 Tokio-powered: Seamless integration with Tokio's async ecosystem
- 🧩 Extensible: Custom event types and handler registration
- 🔄 Bi-directional Communication: Support both event emission and response handling
Usage 🚀
See The Examples
Define Events
Create & Collect Subscribers
static SUBSCRIBERS: & = &;
async
// outher side: without state or ret
async
// custom event query
// ... see example
// merge event and state
// ... see example
Create a Bus
let subscribes = init;
let mut builder = new;
builder.add_pair;
let Bus = builder.build;
Create a State
let state = new;
Tick the Bus
loop
// ... and effect see example
Procedure Call
See The Examples
todo
- middleware support
- custom serializer & deserializer
- procedure call