sombra

Crates.iosombra
lib.rssombra
version0.3.6
created_at2025-10-22 19:13:52.035089+00
updated_at2025-10-26 02:32:53.514287+00
descriptionHigh-performance graph database with ACID transactions, single-file storage, and bindings for Rust, TypeScript, and Python
homepage
repositoryhttps://github.com/maskdotdev/sombra
max_upload_size
id1896095
size916,495
Fabian Rodriguez (rodrez)

documentation

https://docs.rs/sombra

README

Sombra Core

Core Rust library for Sombra, a high-performance graph database.

Note: This is alpha software under active development. APIs may change between minor versions.

Overview

This package contains the core graph database implementation for Sombra. It provides the foundational data structures, storage engine, and graph algorithms that power the Node.js and Python bindings.

Features

  • Property Graph Model: Nodes, edges, and flexible properties
  • Single File Storage: SQLite-style database files
  • ACID Transactions: Full transactional support with rollback
  • Write-Ahead Logging: Crash-safe operations
  • Page-Based Storage: Efficient memory-mapped I/O
  • B-tree Primary Index: Memory-efficient indexing with better cache locality
  • Label Index: Fast label-based queries with O(1) lookup
  • LRU Node Cache: High hit rate for repeated reads
  • Performance Metrics: Real-time monitoring of cache, queries, and traversals

Usage

Add to your Cargo.toml:

[dependencies]
sombra = "0.4.0"

Example

use sombra::prelude::*;

let mut db = GraphDB::open("my_graph.db")?;

let mut tx = db.begin_transaction()?;

let user = tx.add_node(Node::new(0))?;
let post = tx.add_node(Node::new(1))?;
tx.add_edge(Edge::new(user, post, "AUTHORED"))?;

tx.commit()?;

let neighbors = db.get_neighbors(user)?;
println!("User {} authored {} posts", user, neighbors.len());

Documentation

See the main Sombra documentation for full API reference.

Repository

GitHub

License

MIT

Commit count: 0

cargo fmt