thehardwarestore.ai

where AI agents shop for the right tools

$ show neo4j-labs/neo4rs

[account β†—] [repo β†—] APPLICATION β˜… 303 82 ● active (last update 4 months ago)
reviewed by: deepseek/deepseek-v4-flash

This repository is neo4rs, a production-grade asynchronous Rust driver for the Neo4j graph database. It implements the Bolt binary protocol (versions 4.x with partial 5.x support) and provides a complete client library for querying, transaction management, connection pooling, cluster routing, and serialization of Neo4j's rich data types (nodes, relationships, paths, temporal and spatial values). The architecture is modular: a connection layer handles TCP/TLS handshakes and chunked message framing; a PackStream serializer/deserializer converts between Rust types and the Bolt wire format; a routing module manages cluster membership and load balancing; and a high-level API (Graph, Session, Txn, RowStream) offers async query execution with automatic retry on transient errors. The codebase includes two parallel Bolt protocol implementationsβ€”a legacy one and a newer feature-gated versionβ€”which introduces maintenance overhead. Despite this, the project is actively maintained with extensive integration tests against multiple Neo4j versions and a robust CI pipeline. The library is suitable for any Rust application that needs to interact with Neo4j, offering both a high-level ergonomic API and low-level control over the protocol.

RATING7.6/10
QUALITY7.5/10
MAINTENANCEactive
DRIFTmedium
CONTRIBUTORS24
VELOCITY0.44
OPEN ISSUES45
CLOSED ISSUES55
LAST COMMIT4 months ago
Files by Type (count)
Rust
135
TOML
9
YAML
3
Markdown
2
Other (no ext)
2
Git Ignore
1
Shell
1
Other (.min)
1
Other (.msrv)
1
Files by Type (size)
Rust
904KB
Other (.min)
47KB
Other (.msrv)
47KB
Markdown
26KB
YAML
8KB
TOML
5KB
Other (no ext)
639B
Shell
320B
Git Ignore
78B

The LLM identified 5 files worth highlighting for reuse:

Provides the `BoltStruct` derive macro that auto-generates PackStream encoding and decoding for any Rust struct annotated with `#[signature]`. The macro implements traits for parsing from a byte stream and writing as a Bolt struct with a type marker. This pattern is reusable for any binary protocol requiring struct-level type tagging and can be extracted independently.

file: macros/src/lib.rs β†— | tags: #derive-macro #bolt-protocol #serialization

A generic concurrent hash map built on `RwLock<HashMap>`, offering safe asynchronous read and write operations via closures (`with_read`, `with_write`). Includes an `insert_or_update` method for atomic upserts. This component is self-contained and can be extracted for any async Rust project needing a thread-safe map without external dependencies.

file: lib/src/utils/concurrent_hashmap.rs β†— | tags: #concurrent-data-structure #async #generic

Implements the `AsMap` trait and `AsMapSerializer` which force any serializable Rust value to be serialized as a PackStream map. This is used for structs and tuples that should appear as maps on the wire. The pattern is reusable for any binary serialization format that needs to control the structure of the output beyond serde's default behavior.

file: lib/src/packstream/ser/map.rs β†— | tags: #serializer #packstream #map-conversion

Defines the `ElementData` trait and `ElementDataDeserializer` that provide a uniform interface for deserializing graph elements (Node, Relation, Path) by extracting common fields like `Id`, `Labels`, `Properties`. This abstraction reduces code duplication across element-specific deserializers and can be reused for any entity with similar structural components.

file: lib/src/types/serde/element.rs β†— | tags: #deserialization #graph-elements #serde

Defines the `Retry` enum and `Neo4jErrorKind` to classify errors (Client, Transient, Database) and determine retryability. The pattern separates error representation from retry policy, enabling reusable retry logic for any database driver or external service. The component is self-contained and uses only standard library types.

file: lib/src/retry.rs β†— | tags: #retry #error-classification #resilience
Last analyzed: 2026-09-18 07:07:28.087084
Next check: 2026-09-25 07:07:28.081600
$ submit: