| Crates.io | orientdb |
| lib.rs | orientdb |
| version | 0.1.2 |
| created_at | 2018-10-31 20:16:37.690396+00 |
| updated_at | 2025-11-02 16:24:52.39961+00 |
| description | A Rust library for in-memory graph database |
| homepage | |
| repository | |
| max_upload_size | |
| id | 93871 |
| size | 9,864 |
┌─────────┐
│ Node A │
└────┬────┘
│
┌────┴────┬────────┬────────┐
│ │ │ │
┌───▼───┐ ┌──▼───┐ ┌──▼───┐ ┌──▼───┐
│Node B │ │Node C│ │Node D│ │Node E│
└───┬───┘ └──┬───┘ └──────┘ └──┬───┘
│ │ │
┌───▼───┐ ┌──▼───┐ ┌──▼───┐
│Node F │ │Node G│ │Node H│
└───────┘ └──────┘ └──────┘
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.
Add this to your Cargo.toml:
[dependencies]
orientdb = "0.1.1"
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}.");
}
}
}
}
cargo run --example basic
cargo run --example find
OrientDB is optimized for scenarios where:
MIT