Hacker News new | ask | show | jobs
by tayo42 1477 days ago
How are people writing high throughput web/network services without async? Is there a async library to use. Like what do you reach for if you wanted to write redis or nginx with rust?
1 comments

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?
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.