orientdb 0.1.2

A Rust library for in-memory graph database
Documentation
  • Coverage
  • 25%
    1 out of 4 items documented0 out of 0 items with examples
  • Size
  • Source code size: 9.39 kB This is the summed size of all the files inside the crates.io package for this release.
  • Documentation size: 1.6 MB This is the summed size of all files generated by rustdoc for all configured targets
  • Ø build duration
  • this release: 16s Average build duration of successful builds.
  • all releases: 11s Average build duration of successful builds in releases after 2024-10-23.
  • Links
  • crates.io
  • Dependencies
  • Versions
  • Owners
  • mykhailokrainik

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