Rust support for databases occurs on multiple levels, from direct drivers to ORMs. Some of the crates are async and some not, which modifies how other code will has to interact with them.
Database drivers and bindings[edit | edit source]
postgres - includes tokio_postgres for async operations and Postgres pub/sub.
rusqlite - sqlite
ORMs[edit | edit source]
diesel is popular, strongly typed ORM. Supports sqlite, Postgres, and mysql.
Table for SQL types in diesel: https://kotiri.com/2018/01/31/postgresql-diesel-rust-types.html
Other[edit | edit source]
sqlx is a newer crate that supports type checked SQL queries. Fully async and supports Postgres pub/sub.