rdf-store 0.3.4

An in-memory storage adapter for RDF.rs knowledge graphs.
Documentation

RDF.rs: Heap Store

License Compatibility Package Documentation

An in-memory storage adapter for RDF.rs knowledge graphs.

[!TIP] 🚧 We are building in public. This is presently under heavy construction.

[Features] | [Prerequisites] | [Installation] | [Examples] | [Reference] | [Development]

✨ Features

  • Implements a scalable, high-performance in-memory RDF quad store.
  • Built on async Rust using lazily-evaluated streams throughout.
  • 100% pure and safe Rust with minimal dependencies and no bloat.
  • Supports opting out of any feature using comprehensive feature flags.
  • Adheres to the Rust API Guidelines in its naming conventions.
  • Cuts red tape: 100% free and unencumbered public domain software.

🛠️ Prerequisites

  • Rust 1.85+ (2024 edition)

⬇️ Installation

Installation via Cargo

cargo add rdf-store

Installation in Cargo.toml

Enable all default features:

[dependencies]
rdf-store = { version = "0.3" }

Enable only specific features:

[dependencies]
rdf-store = { version = "0.3", default-features = false, features = ["unstable"] }

👉 Examples

Importing the Library

use rdf_store::{HeapStore, HeapTransaction};

Creating a Store

let mut store = HeapStore::new();

Mutating the Store

let mut tx = store.write().await?;

tx.remove(old_quad.into()).await?;
tx.insert(new_quad.into()).await?;

tx.commit().await?; // ...or:
//tx.rollback().await?;

Accessing the Store

let tx = store.read().await?;

tx.r#match(quad_pattern)
    .for_each(|quad| async move {
        eprintln!("{:?}", quad);
    })
    .await;

📚 Reference

docs.rs/rdf-store

Storage Adapters

Package Crate Docs
rdf-store Package Documentation
rdf-store-mongo Package Documentation
rdf-store-neo4j Package Documentation
rdf-store-oxigraph Package Documentation
rdf-store-postgres Package Documentation
rdf-store-qlever Package Documentation
rdf-store-sqlite Package Documentation
rdf-store-turso Package Documentation
rdf-store-valkey Package Documentation
rdf-store-virtuoso Package Documentation

👨‍💻 Development

git clone https://github.com/rust-rdf/rdf.rs.git

Share on X Share on Reddit Share on Hacker News Share on Facebook Share on LinkedIn