Generated by GPT-5-mini| Neon (library) | |
|---|---|
| Name | Neon |
| Developer | PostgreSQL Global Development Group |
| Latest release | 1.0 |
| Programming language | Rust |
| Operating system | Linux |
| License | MIT |
Neon (library) Neon is an open-source library that provides bindings and tooling to enable Rust programs to interface with the PostgreSQL protocol and server implementations. It targets interoperability with projects such as PostgreSQL, TimescaleDB, Citus, Amazon Aurora, and cloud services, aiming to combine Rust performance with established libpq-style ecosystems. Neon emphasizes safe memory management, zero-cost abstractions, and integration with async runtimes like Tokio (software), async-std, and Smol (runtime).
Neon focuses on connecting Rust applications to SQL databases and server-side extensions, supporting protocols used by Postgres Pro, Greenplum, CockroachDB, and client ecosystems like psql, PgBouncer, and PgPool-II. The project aligns with standards set by the SQL:2016 specification and interacts with wire protocols implemented in pgwire-compatible stacks. Neon provides an alternative to other language bindings such as libpq, psycopg2, JDBC, ODBC, and node-postgres, enabling Rust projects that relate to initiatives like Diesel (software), SeaORM, sqlx, Prisma (software), and ActiveRecord to access PostgreSQL features including JSONB, hstore, PostGIS, and FDW modules.
Neon is implemented primarily in Rust (programming language), leveraging language features popularized by projects like Servo, rustc, and Tokio (software). Its architecture separates protocol parsing, connection pooling, and type mappings; these layers mirror approaches seen in libpq, pgjdbc, and psycopg. Neon uses asynchronous I/O patterns influenced by Mio (library), futures-rs, and scheduling strategies from Rayon (software). For memory safety and performance it adopts techniques from LLVM, Clang, and BoringSSL-adjacent TLS stacks, optionally integrating with OpenSSL, LibreSSL, and Rustls. Neon’s type system interop borrows from design ideas in Serde, NumPy, Arrow (Apache Arrow), and Protobuf implementations, flattening composite types for compatibility with ORMs like SeaORM and migration tools such as Flyway and Liquibase.
Neon is distributed via package systems familiar to Cargo (software), Crates.io, and containerized deployments on Docker, Kubernetes, Helm (software), and OpenShift. Installation instructions reference continuous integration platforms such as GitHub Actions, GitLab CI, Travis CI, and CircleCI, and deployment examples integrate with cloud providers like Amazon Web Services, Google Cloud Platform, Microsoft Azure, DigitalOcean, and Heroku. Typical usage patterns involve async connection management compatible with Tokio (software), integration with web frameworks such as Actix (software), Rocket, Warp (web framework), and Axum (software), and middleware ecosystems including Tower (library), Hyper (software), and Gin (web framework). Neon exposes APIs to map SQL types to Rust equivalents used by projects like Serde, Chrono (crate), uuid (package), and BigDecimal (crate).
Benchmark suites for Neon compare latency and throughput against drivers and ORMs like libpq, psycopg2, pgjdbc, node-postgres, sqlx, and Diesel (software). Microbenchmarks emphasize async performance with runtimes Tokio (software) and async-std, I/O characteristics on filesystems used by ext4, XFS, and storage services such as Amazon EBS and Google Persistent Disk, and TLS handshake times with OpenSSL and Rustls. Neon’s performance claims are validated using benchmarking tools and frameworks including Criterion (Rust), wrk, pgbench, sysbench, and profiling with perf (Linux), Valgrind, and Flamegraph (perf). Comparative studies often reference database workloads standardized by TPC-C, TPC-H, and YCSB and integrate with observability stacks like Prometheus, Grafana, and Jaeger for tracing.
Neon sits in an ecosystem alongside language bindings and client libraries such as psycopg2, node-postgres, pgjdbc, ODBC, JDBC, ADO.NET, Haskell Database Connectivity, and Go (programming language) sql package. It interoperates with ORMs like Diesel (software), SeaORM, sqlx, Prisma (software), Hibernate, and Entity Framework through standardized SQL interfaces and type mapping strategies. Neon’s community contributions integrate adapters for data processing projects such as Apache Kafka, Debezium, Apache Arrow, Apache Spark, ClickHouse, and Presto (Trino), and tools for migrations and CI/CD such as Flyway, Liquibase, Ansible, and Terraform. Bindings and adapter examples often target web platforms like Actix (software), Rocket, Django, Ruby on Rails, and ASP.NET for polyglot system architectures.
Neon’s development model follows open-source practices used by communities around Rust Foundation, The Linux Foundation, PostgreSQL Global Development Group, and projects hosted on GitHub, GitLab, and SourceForge. Contribution workflows mirror patterns established by LLVM, Kubernetes, Docker, and systemd with issue tracking, pull request review, and continuous integration. Governance may reference code of conduct examples from Contributor Covenant and licensing practices from MIT License, Apache License 2.0, and GPL. The project coordinates with database vendors and research groups such as EDB (EnterpriseDB), 2ndQuadrant, Timescale, Citus (company), and academic labs that publish at venues including SIGMOD, VLDB, ICDE, and USENIX.
Category:Rust libraries