bevy_wasm
bevy_wasm copied to clipboard
Custom connection struct in favor of event writers
Currently, communication is handled through Bevy's EventReader and EventWriter. What I'd like is some kind of ModConnection struct instead that maps directly to the ffi calls rather than overly abstracting them.
Current:
fn system(in: EventReader<In>, out: EventWriter<Out>)
Proposed:
fn system(conn: ModConnection<In, Out>)
Perhaps a standardized Protocol type could be established that would hold these more obtuse types.
i.e.
fn system(conn: ModConnection<MyProtocol>)