4 ms·
I'm not a rust expert by any means, but redis and nginx are both written in C, which doesn't have async as a language feature. Is there a reason the techniques
by TFortunato 4y ago
I'm not a rust expert by any means, but redis and nginx are both written in C, which doesn't have async as a language feature. Is there a reason the techniques used there wouldn't translate to rust, regardless of the state of rusts native async support?
- tayo42 4y agoyeah, rusts async/await is just making it nicer to use the same ideas. like is there a libuv or libevent in the rust world thats being used?
- steveklabnik 4y agohttps://crates.io/crates/mio https://crates.io/crates/mio is the de-facto standard package that's similar to libuv/libevent. The most popular async executor, Tokio, is built on top of this. They're maintained by the same organization.
- tayo42 4y agoI thought this library had alot less features then the popular c event loop libraries?
- steveklabnik 4y agoI haven't written anything against it directly in years at this point, so I can't speak to that, it's just the best example of a library at the same level of abstraction.
- steveklabnik 4y agoYou can, it's just not as nice. Writing code this way can also require unsafe. Async in Rust is primarily about achieving zero-cost async code in a safe way.