neo4rs
A native async Rust driver for the Neo4j graph database, built on the Bolt protocol.
Repository Health
Technical Analysis
neo4rs is a driver for the Neo4j graph database written in Rust. It implements the Bolt protocol directly and provides an async, Tokio-based client for connecting to Neo4j, running Cypher queries, streaming results, and working with graph values like nodes, relationships, and paths.
Maintained under Neo4j Labs, it is compatible with Neo4j 5.x and 4.4, supports concurrent queries over a cloneable Graph handle, and offers ergonomic deserialization of query rows into Rust types.
What You Get
- A native async
Graphclient that speaks the Neo4j Bolt protocol. - Cypher query execution with parameter binding and streaming result rows.
- Deserialization of nodes, relationships, paths, and scalar values into Rust types.
- Compatibility with Neo4j 5.x and 4.4 with connection pooling and concurrency.
Common Use Cases
- Querying a Neo4j graph database from Rust web services and background workers.
- Running concurrent Cypher queries with a shared, cloneable client handle.
- Building graph-backed features like recommendations, fraud detection, or knowledge graphs.
Under The Hood
Architecture - The Cargo workspace is split into lib/ (the neo4rs crate), a macros/ crate for derive support, plus integrationtests/ and xtask/. The library implements the Bolt message specification and exposes a Graph type that manages a connection pool; queries are built with a query() helper and executed asynchronously, returning a row stream that deserializes into Rust types.
Tech Stack - Written in async Rust on Tokio, it implements Bolt (Neo4j’s binary wire protocol) itself rather than wrapping a C driver, and uses a derive macro crate for mapping graph rows to structs.
Code Quality - The repo carries a dedicated integrationtests/ crate that runs against real Neo4j versions in CI, a changelog, release tooling, and ~24 contributors; testing against live databases across supported Neo4j versions gives strong confidence in protocol correctness.
API Design - The surface centers on a cloneable Graph handle and a query() builder with $param binding, closely mirroring how Cypher is written; docs.rs documentation and Neo4j’s community-driver guide make getting started straightforward for anyone familiar with Cypher.