Hacker News new | ask | show | jobs
by TFortunato 1469 days 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?
2 comments

You 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.
yeah, 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?
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.
I thought this library had alot less features then the popular c event loop libraries?
I 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.