Cycle-accurate 6502 emulator as coroutine in Rust

18 pointsposted a day ago
by bagnalla

1 Comments

skavi

15 hours ago

super cool! i’m really bullish on coroutines as a way of isolating state machines from actual mutations of state. i.e. doing pretty much what you’ve done here but for all sorts of business logic.

another cool rust project messing with coroutines is effing-mad [0] which implements an effects system on top of them.

on the actual implementation, i’m curious as to why you return the coroutine boxed, rather than as an RPIT? i feel that could potentially lead to some missed optimizations, but probably nothing significant.

[0]: https://github.com/rosefromthedead/effing-mad