News for hackers. Stuff that matters.
Re:Choosing a Rust web framework by xwdv on Sunday July 05, 2020 @02:00PM (#23740543)
What’s a good PostgreSQL interface in Rust? Not looking for ORMs.
Re:Choosing a Rust web framework by Spartan-S63 on Sunday July 05, 2020 @02:11PM (#23740629)
Diesel is going to be your most ORM-like option, which isn't what you're looking for. `tokio-postgres` is great for async connections.

SQLx is also a really good option, too, and has some ORM-like features (such as transforming SQL rows into a Rust struct via macros) while still allowing SQL to be a first-class citizen. SQLx is also async, so that would probably be the best one to look at first.

Re:Choosing a Rust web framework by aliceryhl on Sunday July 05, 2020 @02:03PM (#23740567)
For a blocking interface, use https://docs.rs/postgres and for an async interface https://docs.rs/tokio-postgres
Re:Choosing a Rust web framework by brunoqc on Sunday July 05, 2020 @02:09PM (#23740615)
Also look at https://github.com/launchbadge/sqlx. I love compile-time checked queries (it's optional).

It's simple to use too, async and includes a pool.

Re:Choosing a Rust web framework by stu2b50 on Sunday July 05, 2020 @02:03PM (#23740575)
There's rust-postgres, which is just a driver as you are looking for. It's not exactly what I'd call mature.

Diesel is more mature, but it is an ORM, albeit one with significantly less "magic", so maybe you'll like it more.

Re:Choosing a Rust web framework by yannikyeo on Sunday July 05, 2020 @02:56PM (#23740971)
My goto is SQLx with Warp.