3 ms·
Agreed, I rewrote a 10k line a js websocket based game server[0] a few months ago into async Rust. It was mostly painless I didn't have to deal with closures m
by __s 6y ago
Agreed, I rewrote a 10k line a js websocket based game server[0] a few months ago into async Rust. It was mostly painless
I didn't have to deal with closures much because I'm comfortable writing a 2000 line match
0: https://github.com/serprex/openEtG/tree/master/src/rs/server https://github.com/serprex/openEtG/tree/master/src/rs/server
- adamch 6y agoWow, awesome code. I really respect the 2000 line match, it's a really neat abstraction. Keep some state, have an exhaustive list of everything users can do, and define exactly how each possible user action can change that state. Beautiful.