Skip to main content

ruvector_graph/
lib.rs

1//! # RuVector Graph Database
2//!
3//! A high-performance graph database layer built on RuVector with Neo4j compatibility.
4//! Supports property graphs, hypergraphs, Cypher queries, ACID transactions, and distributed queries.
5
6pub mod bm25;
7pub mod codegen;
8pub mod cypher;
9pub mod edge;
10pub mod embed;
11pub mod error;
12pub mod executor;
13pub mod graph;
14pub mod hyperedge;
15pub mod index;
16pub mod node;
17pub mod schema;
18pub mod storage;
19pub mod transaction;
20pub mod typed_graph;
21pub mod types;
22
23// Performance optimization modules
24pub mod optimization;
25
26// Vector-graph hybrid query capabilities
27pub mod hybrid;
28
29// Distributed graph capabilities
30#[cfg(feature = "distributed")]
31pub mod distributed;
32
33// Core type re-exports
34pub use edge::{Edge, EdgeBuilder};
35pub use error::{GraphError, Result};
36pub use graph::GraphDB;
37pub use hyperedge::{Hyperedge, HyperedgeBuilder, HyperedgeId};
38pub use bm25::{Bm25Index, Bm25Params};
39pub use embed::{Embedder, HashEmbedder};
40pub use node::{Node, NodeBuilder};
41pub use schema::{
42    reciprocal_rank_fusion, DistanceMetric, EdgeSchema, GraphSchema, NodeSchema, PropertySchema,
43    PropertyType, VectorSchema,
44};
45pub use typed_graph::{Direction, TraversalResult, TraverseSpec, TypedGraph};
46#[cfg(feature = "storage")]
47pub use storage::GraphStorage;
48pub use transaction::{IsolationLevel, Transaction, TransactionManager};
49pub use types::{EdgeId, Label, NodeId, Properties, PropertyValue, RelationType};
50
51// Re-export hybrid query types when available
52#[cfg(not(feature = "minimal"))]
53pub use hybrid::{
54    EmbeddingConfig, GnnConfig, GraphNeuralEngine, HybridIndex, RagConfig, RagEngine,
55    SemanticSearch, VectorCypherParser,
56};
57
58// Re-export distributed types when feature is enabled
59#[cfg(feature = "distributed")]
60pub use distributed::{
61    Coordinator, Federation, GossipMembership, GraphReplication, GraphShard, RpcClient, RpcServer,
62    ShardCoordinator, ShardStrategy,
63};
64
65#[cfg(test)]
66mod tests {
67    #[test]
68    fn test_placeholder() {
69        // Placeholder test to allow compilation
70        assert!(true);
71    }
72}