overgraph/lib.rs
1//! # OverGraph
2//!
3//! An absurdly fast embedded graph database. Pure Rust, sub-microsecond reads.
4//!
5//! OverGraph stores typed nodes and edges with schemaless properties (MessagePack),
6//! temporal validity windows, exponential decay scoring, and automatic retention
7//! policies. It runs inside your process with no separate server or network calls.
8//!
9//! ## Quick start
10//!
11//! ```no_run
12//! use overgraph::{DatabaseEngine, DbOptions, UpsertNodeOptions, NeighborOptions};
13//!
14//! use std::path::Path;
15//! let mut db = DatabaseEngine::open(Path::new("./my-db"), &DbOptions::default()).unwrap();
16//! let id = db.upsert_node(1, "user:alice", UpsertNodeOptions::default()).unwrap();
17//! let neighbors = db.neighbors(id, &NeighborOptions { limit: Some(50), ..Default::default() }).unwrap();
18//! db.close().unwrap();
19//! ```
20//!
21//! ## Storage engine
22//!
23//! Log-structured merge tree: WAL -> memtable -> immutable segments -> background
24//! compaction. Reads never block writes. Segments are memory-mapped for zero-copy
25//! access through the OS page cache.
26//!
27//! ## Language connectors
28//!
29//! Native bindings for Node.js (napi-rs) and Python (PyO3) with full API parity.
30
31// Public API: the types and engine that library users interact with.
32pub mod engine;
33pub mod error;
34pub mod types;
35
36// Internal modules: accessible within the workspace (connectors, CLI binaries)
37// but hidden from public documentation since they are implementation details.
38#[doc(hidden)]
39pub mod dense_hnsw;
40#[doc(hidden)]
41pub mod encoding;
42#[doc(hidden)]
43pub mod manifest;
44#[doc(hidden)]
45pub mod memtable;
46#[doc(hidden)]
47pub(crate) mod parallel;
48#[doc(hidden)]
49pub mod segment_reader;
50#[doc(hidden)]
51pub mod segment_writer;
52#[doc(hidden)]
53pub mod source_list;
54#[doc(hidden)]
55pub mod sparse_postings;
56#[doc(hidden)]
57pub mod wal;
58#[doc(hidden)]
59pub mod wal_sync;
60
61pub use engine::DatabaseEngine;
62pub use error::EngineError;
63pub use types::*;