#postgresql #tokio #native

postgres-shared

Internal crate used by postgres and postgres-tokio

8 releases

Uses old Rust 2015

0.4.2 Aug 23, 2018
0.4.1 Feb 12, 2018
0.4.0 Jul 23, 2017
0.3.0 Jun 11, 2017
0.1.0 Dec 26, 2016

#5 in #tokio

Download history 374/week @ 2026-03-03 1576/week @ 2026-03-10 1347/week @ 2026-03-17 1286/week @ 2026-03-24 1538/week @ 2026-03-31 1326/week @ 2026-04-07 1194/week @ 2026-04-14 1260/week @ 2026-04-21 1365/week @ 2026-04-28 1524/week @ 2026-05-05 1723/week @ 2026-05-12 1477/week @ 2026-05-19 1348/week @ 2026-05-26 1072/week @ 2026-06-02

5,884 downloads per month
Used in 58 crates (2 directly)

MIT license

270KB
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

~3.5–5MB
~101K SLoC