orientdb

Crates.ioorientdb
lib.rsorientdb
version0.1.2
created_at2018-10-31 20:16:37.690396+00
updated_at2025-11-02 16:24:52.39961+00
descriptionA Rust library for in-memory graph database
homepage
repository
max_upload_size
id93871
size9,864
Mykhailo Krainik (mykhailokrainik)

documentation

README

OrientDB

    ┌─────────┐
    │  Node A │
    └────┬────┘
         │
    ┌────┴────┬────────┬────────┐
    │         │        │        │
┌───▼───┐ ┌──▼───┐ ┌──▼───┐ ┌──▼───┐
│Node B │ │Node C│ │Node D│ │Node E│
└───┬───┘ └──┬───┘ └──────┘ └──┬───┘
    │        │                 │
┌───▼───┐ ┌──▼───┐         ┌──▼───┐
│Node F │ │Node G│         │Node H│
└───────┘ └──────┘         └──────┘

Overview

OrientDB is a simple, lightweight in-memory graph database library built with Rust. Designed with minimalism in mind, it provides a clean and efficient API for managing graph data structures without the overhead of traditional database systems.

Features

  • In-Memory Storage: Lightning-fast access to graph data stored entirely in memory
  • Minimal Design: Simple, intuitive API with zero bloat
  • Optimized Tree Search: Implements fast algorithms for efficient tree traversal and search operations
  • Pure Rust: Written entirely in Rust for safety, performance, and reliability

Installation

Add this to your Cargo.toml:

[dependencies]
orientdb = "0.1.1"

Quick Start

use orientdb::SimpleGraph;

fn main() {
    let mut graph = SimpleGraph::new();

    let tokyo = graph.add_node("Tokyo");
    let kyoto = graph.add_node("Kyoto");
    let osaka = graph.add_node("Osaka");

    graph.add_edge(tokyo, kyoto);
    graph.add_edge(kyoto, osaka);

    println!("Stored {} cities in the graph.", graph.node_count());

    if let Some(neighbors) = graph.neighbors(tokyo) {
        for &neighbor_id in neighbors {
            if let Some(&city) = graph.get_node(neighbor_id) {
                println!("Tokyo connects to {city}.");
            }
        }
    }
}

Examples

    cargo run --example basic
    cargo run --example find

Performance

OrientDB is optimized for scenarios where:

  • Data fits entirely in memory
  • Fast read/write operations are critical
  • Minimal overhead is required
  • Tree search performance is a priority

License

MIT

Commit count: 0

cargo fmt