Open-Awesome
CategoriesAlternativesStacksSelf-HostedExplore
Open-Awesome

© 2026 Open-Awesome. Curated for the developer elite.

TermsPrivacyAboutGitHubRSS
  1. Home
  2. Rust
  3. rust-postgres

rust-postgres

Apache-2.0Rustpostgres-native-tls-v0.5.3

Native PostgreSQL driver for Rust with synchronous and asynchronous client options.

GitHubGitHub
3.9k stars558 forks0 contributors

What is rust-postgres?

Rust-Postgres is a native PostgreSQL driver for the Rust programming language that provides both synchronous and asynchronous database connectivity. It solves the problem of accessing PostgreSQL databases from Rust applications with idiomatic APIs and comprehensive type support. The project includes multiple crates for different needs including TLS support and type conversions.

Target Audience

Rust developers building applications that need to interact with PostgreSQL databases, ranging from simple CLI tools to high-performance async web services.

Value Proposition

Developers choose Rust-Postgres because it offers both synchronous and asynchronous clients in one ecosystem, provides native Rust-PostgreSQL type conversions, and includes multiple TLS backend options for flexible security configurations.

Overview

Native PostgreSQL driver for the Rust programming language

Use Cases

Best For

  • Building synchronous Rust applications that need PostgreSQL access
  • Developing high-concurrency async services with Tokio and PostgreSQL
  • Projects requiring secure TLS connections to PostgreSQL databases
  • Applications needing seamless Rust-PostgreSQL type conversions
  • Teams wanting a well-tested PostgreSQL driver with Docker-based testing
  • Rust developers preferring native database drivers over ORMs

Not Ideal For

  • Projects requiring an object-relational mapper with automatic schema migrations
  • Teams wanting batteries-included database tooling with built-in connection pooling
  • Applications needing cross-database compatibility or vendor-agnostic backends

Pros & Cons

Pros

Dual Client Support

Provides both synchronous (`postgres`) and asynchronous (`tokio-postgres`) clients, allowing developers to choose the right model for their application's concurrency needs, as highlighted in the README.

Seamless Type Conversions

The `postgres-types` crate enables automatic conversions between Rust structs and PostgreSQL data types, reducing boilerplate code for data handling.

Flexible TLS Options

Offers multiple TLS backends via separate crates like `postgres-native-tls` and `postgres-openssl`, catering to different security requirements as noted in the features.

Rigorous Testing Suite

Includes a Docker-based test setup described in the README, ensuring reliability and ease of validation across development environments.

Cons

No Built-in Connection Pooling

The library lacks integrated connection pooling, requiring developers to add third-party crates for efficient connection management in production applications.

Docker Dependency for Testing

The test suite relies on Docker and docker-compose, which adds setup complexity and may not be feasible in environments without container support.

Low-Level API

As a native driver, it requires manual SQL query construction and result handling, lacking high-level abstractions like query builders or ORM features.

Frequently Asked Questions

Quick Stats

Stars3,938
Forks558
Contributors0
Open Issues116
Last commit11 days ago
CreatedSince 2013

Tags

#database-driver#native-client#async-rust#tls#tokio#postgresql#database-connectivity#rust#sql

Built With

O
OpenSSL
n
native-tls
D
Docker Compose
R
Rust
T
Tokio
D
Docker

Included in

Rust56.6k
Auto-fetched 22 hours ago

Related Projects

SurrealDBSurrealDB

A scalable, distributed, collaborative, document-graph database, for the realtime web

Stars32,349
Forks1,279
Last commit3 days ago
QdrantQdrant

Qdrant - High-performance, massive-scale Vector Database and Vector Search Engine for the next generation of AI. Also available in the cloud https://cloud.qdrant.io/

Stars31,902
Forks2,329
Last commit1 day ago
RustFSRustFS

🚀2.3x faster than MinIO for 4KB object payloads. RustFS is an open-source, S3-compatible high-performance object storage system supporting migration and coexistence with other S3-compatible platforms such as MinIO and Ceph.

Stars28,517
Forks1,233
Last commit23 hours ago
NeonNeon

Neon: Serverless Postgres. We separated storage and compute to offer autoscaling, code-like database branching, and scale to zero.

Stars22,167
Forks982
Last commit14 days ago
Community-curated · Updated weekly · 100% open source

Found a gem we're missing?

Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.

Submit a projectStar on GitHub