8 releases (4 breaking)

0.5.1 Feb 2, 2025
0.5.0 Dec 25, 2020
0.4.0 Oct 17, 2020
0.3.0 Dec 23, 2019
0.1.0 Nov 12, 2018

#1352 in Database interfaces

Download history 19878/week @ 2024-10-26 21376/week @ 2024-11-02 19436/week @ 2024-11-09 24678/week @ 2024-11-16 21750/week @ 2024-11-23 19726/week @ 2024-11-30 21810/week @ 2024-12-07 23882/week @ 2024-12-14 10728/week @ 2024-12-21 12642/week @ 2024-12-28 18660/week @ 2025-01-04 20412/week @ 2025-01-11 22316/week @ 2025-01-18 27402/week @ 2025-01-25 24896/week @ 2025-02-01 28113/week @ 2025-02-08

106,845 downloads per month
Used in 20 crates (16 directly)

MIT/Apache

300KB
6.5K 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

~9–19MB
~275K SLoC