MeshDB

A distributed, Cypher-compliant graph database — written in Rust.

Speaks Bolt 5 natively, so every Neo4j driver just works. Backed by RocksDB. Replicated with Raft or sharded across peers with 2PC.

$ cargo install meshdb-server

Your Cypher, your drivers, your stack.

MeshDB is a modern rewrite of the graph database, built from the ground up in safe, fast Rust. It speaks the same wire protocol as Neo4j, so you keep your existing code — while getting a small, auditable binary and a clustering story that's transparent, not magic.

Cypher, not half-Cypher

MATCH, CREATE, MERGE, SET, DELETE, variable-length paths, aggregates, list comprehensions, CASE, UNWIND, parameters — the subset that real workloads actually use.

Bolt 5 wire protocol

Bolt 5.0–5.4 (with 4.4 fallback): HELLO, RUN, PULL, BEGIN/COMMIT, parameters, explicit transactions. Point the official Neo4j driver at bolt://host:7687 and go.

Rust, end to end

No JVM, no GC pauses, no heap tuning. A single statically-linked binary, built on tokio, tonic, pest, and rust-rocksdb. Memory-safe by construction.

RocksDB storage

Property graphs persisted in the same LSM engine that powers CockroachDB, TiKV, and Kafka Streams. Durable, fast, and battle-tested.

Distribution, two ways

Run a single node, a Raft-replicated cluster via openraft, or a hash-partitioned sharded cluster with a 2PC coordinator and ghost-edge replication.

gRPC for services

A first-class tonic gRPC surface for service-to-service traffic and cluster internals — no Bolt-adjacent hacks, no extra proxies.

APOC-compatible

A broad slice of the APOC surface ships in-tree: apoc.coll.*, apoc.text.*, apoc.map.*, apoc.date.*, apoc.create.*, apoc.agg.*, and apoc.periodic.iterate. On by default, trimmable per namespace.

Spatial and composite indexes

Node and relationship indexes, composite keys, POINT indexes backed by a Z-order quantizer for Cartesian and WGS-84 points. UNIQUE, NOT NULL, type, and NODE KEY constraints — all DDL replicated across Raft and routing clusters.

From zero to a query in 90 seconds.

No coordinator to install first, no JDK, no Docker Compose file. Grab the binary, pass a handful of flags, and connect with any Bolt driver.

1. Install the server

cargo install meshdb-server

2. Run it

RUST_LOG=info meshdb-server \
  --self-id 1 \
  --listen-address 127.0.0.1:7001 \
  --data-dir /tmp/mesh-data \
  --bolt-address 127.0.0.1:7687

3. Or configure it via environment

MESHDB_SELF_ID=1 \
MESHDB_LISTEN_ADDRESS=127.0.0.1:7001 \
MESHDB_DATA_DIR=/tmp/mesh-data \
MESHDB_BOLT_ADDRESS=127.0.0.1:7687 \
  meshdb-server

4. Or, run with Docker

docker run --rm \
  -p 7001:7001 -p 7687:7687 \
  -v meshdb-data:/data \
  -e MESHDB_SELF_ID=1 \
  -e MESHDB_LISTEN_ADDRESS=0.0.0.0:7001 \
  -e MESHDB_BOLT_ADDRESS=0.0.0.0:7687 \
  -e MESHDB_DATA_DIR=/data \
  darkspar/meshdb-server:0.2.0

5. Query it — with the Neo4j driver

from neo4j import GraphDatabase

driver = GraphDatabase.driver("bolt://127.0.0.1:7687", auth=("any", "any"))
with driver.session() as s:
    s.run("CREATE (:Person {name: $name, age: $age})", name="Ada", age=37)
    for r in s.run("MATCH (p:Person) RETURN p.name AS name ORDER BY name"):
        print(r["name"])

Cluster mode, without the ceremony.

Single-node

One process, one RocksDB directory, both Bolt and gRPC listeners. Perfect for development, embedded services, and small production graphs.

Raft-replicated

A single Raft group replicates the full graph to every peer. Cheap local reads everywhere; writes go through the leader with transparent follower forwarding. Powered by openraft. Need sharding and replication? mode = "multi-raft" gives each partition its own Raft group, with a Spanner-style 2PC for cross-partition writes.

Routing (sharded)

Hash-partitioned nodes across peers. Scatter-gather reads, point-routed writes, and a durable 2PC coordinator for cross-peer atomic transactions.

Open source. MIT licensed.

Read the docs, browse the source, file an issue, or ship a patch.