pd-rs / crankstart

A barely functional, wildly incomplete and basically undocumented Rust crate whose aim is to let you write Games for the Playdate handheld gaming system in Rust.
MIT License
235 stars 24 forks source link

Consider async for callbacks #33

Open rtsuk opened 1 year ago

rtsuk commented 1 year ago

See executor.

rtsuk commented 1 year ago

Also https://crates.io/crates/executor

boozook commented 1 year ago

Is it really necessary? Yes, it's beautiful, but the huge amount of closures in futures will dramatically increase the stack. Isn't it?

rtsuk commented 1 year ago

It's not necessary, but the callback-heavy nature of the Playdate API might make it the easiest course.

I think async closures tend to be allocated on the heap, since they outlive any single stack frame.