5 ms·
There are two problems with using Rust for web servers: 1. The only production-ready Rust web servers require writing async request handlers. Async Rust is no
by mleonhard 3y ago
There are two problems with using Rust for web servers:
1. The only production-ready Rust web servers require writing async request handlers. Async Rust is not fun.
2. The only good Postgres client library is async: https://crates.io/crates/sqlx https://crates.io/crates/sqlx
I'm trying to remedy the first problem with https://crates.io/crates/servlin https://crates.io/crates/servlin .
Solving the second problem will be another project. I hope someone else does it. There is https://crates.io/crates/diesel https://crates.io/crates/diesel but it has the same problem as async Rust: incomprehensible build errors.
- misterio7 3y agoHonest question: what is it that you dislike in async rust? I personally find it is pretty straightforward
- mplanchard 3y agoI also don’t have any real issues with async rust. It would be nice if there were a better functional-style interface than what you can get with FuturesExt, but you just drop to procedural style when you need to and it’s fine.
- misterio7 3y agoYeah the only painpoint I have is that it's awkward to use async inside closures, otherwise, things are pretty smooth IMO.