ic-event-hub-macros 0.3.0

Event-based pub/sub for IC canisters
Documentation

Various macro for IC canisters to enable event-based pub/sub

Usage:

// somewhere in your canister
implement_event_emitter!();
implement_subscribe!();
implement_unsubscribe!();

...

#[derive(Event)]
struct Event {
#[topic]
pub a: u64,
pub b: String,
}

emit(Event {
a: 10,
b: String::from("test")
});

Check the companion crate to see how a listener could start receiving events