Keyboard shortcuts

Press or to navigate between chapters

Press S or / to search in the book

Press ? to show this help

Press Esc to hide this help

Introduction

MarsDB is an embeddable property-graph database with an openCypher query subset: single binary, single file, optional in-memory mode. No server process, no network protocol — it links into your Rust, Python, or Go program (or runs standalone via the marsdb CLI) the same way SQLite does for relational data.

$ marsdb :memory:
MarsDB graph database. Enter Cypher statements terminated by `;`. Ctrl-D to exit.
marsdb> CREATE (a:Person {name: 'Alice'})-[:KNOWS]->(b:Person {name: 'Bob'});
marsdb> MATCH (a:Person)-[:KNOWS]->(b:Person) RETURN a.name, b.name;
a.name | b.name
Alice | Bob

Why MarsDB

  • openCypher subset, measured against the real spec. MarsDB is checked against the openCypher Technology Compatibility Kit (TCK) — 3,880 real conformance scenarios — not just its own test suite. See Cypher Language Support for the exact, current pass rate and what’s covered.
  • Embeddable, not a server. Database::open("path/to.db") or Database::in_memory() and you’re running queries — no daemon to manage, no port to bind, no client/server protocol.
  • Crash-safe by construction. Every Cypher statement runs inside one transaction; marsdb-storage runs on redb, a pure-Rust MVCC single-file engine, and a SIGKILL-and-reopen crash harness checks that every acknowledged commit survives intact.
  • Bindings, not just a Rust crate. Python (PyO3, prebuilt wheels) and Go (cgo against a small C ABI crate) both work today — see Python bindings and Go bindings.

Where to go next

License

Licensed under either of Apache License, Version 2.0 or MIT license at your option.