bevy_wasm icon indicating copy to clipboard operation
bevy_wasm copied to clipboard

Custom connection struct in favor of event writers

Open bakcxoj opened this issue 3 years ago • 0 comments

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>)

bakcxoj avatar Feb 20 '23 19:02 bakcxoj