19 releases

0.2.12 Jan 14, 2026
0.2.11 Oct 8, 2025
0.2.10 Sep 25, 2025
0.2.9 Feb 2, 2025
0.1.0-alpha.2 Nov 28, 2019

#2216 in Database interfaces

Download history 496685/week @ 2025-10-25 496041/week @ 2025-11-01 490448/week @ 2025-11-08 541456/week @ 2025-11-15 483018/week @ 2025-11-22 494614/week @ 2025-11-29 457052/week @ 2025-12-06 477365/week @ 2025-12-13 287183/week @ 2025-12-20 261157/week @ 2025-12-27 487274/week @ 2026-01-03 546220/week @ 2026-01-10 496657/week @ 2026-01-17 545241/week @ 2026-01-24 592939/week @ 2026-01-31 661828/week @ 2026-02-07

2,393,625 downloads per month
Used in 1,027 crates (168 directly)

MIT/Apache

240KB
6K SLoC

Rust-Postgres

PostgreSQL support for Rust.

postgres Latest Version

Documentation

A native, synchronous PostgreSQL client.

tokio-postgres Latest Version

Documentation

A native, asynchronous PostgreSQL client.

postgres-types Latest Version

Documentation

Conversions between Rust and Postgres types.

postgres-native-tls Latest Version

Documentation

TLS support for postgres and tokio-postgres via native-tls.

postgres-openssl Latest Version

Documentation

TLS support for postgres and tokio-postgres via openssl.

Running test suite

The test suite requires postgres to be running in the correct configuration. The easiest way to do this is with docker:

  1. Install docker and docker-compose.
    1. On ubuntu: sudo apt install docker.io docker-compose.
  2. Make sure your user has permissions for docker.
    1. On ubuntu: sudo usermod -aG docker $USER
  3. Change to top-level directory of rust-postgres repo.
  4. Run docker-compose up -d.
  5. Run cargo test.
  6. Run docker-compose stop.

Dependencies

~3–7MB
~133K SLoC