RDF.rs Store: SQLite
A SQLite 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 RDF store backed by SQLite.
- Built on async Rust using lazily-evaluated streams throughout.
- Plays nice with others: interoperates with Oxigraph, Rudof, and Sophia.
- 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
Installation in Cargo.toml
Enable all default features:
[]
= { = "0.4" }
Enable only specific features:
[]
= { = "0.4", = false, = ["tracing"] }
👉 Examples
Importing the Library
use ;
Creating a Store
let mut store = new.await?; // in-memory store
Mutating the Store
let mut tx = store.write.await?;
tx.remove.await?;
tx.insert.await?;
tx.commit.await?;
Accessing the Store
let tx = store.read.await?;
let count = tx.count.await?;
tx.r#match
.for_each
.await;
Querying the Store with SPARQL
To execute SPARQL queries on the store, use the sparql-store crate to wrap
the underlying SqliteStore quad store into a SparqlStore:
use SparqlStore;
let mut store: = ... // TODO
let tx = store.read.await?;
📚 Reference
See Also
| Package | Crate | Docs |
|---|---|---|
| rdf-store-idb | ||
| rdf-store-mongo | ||
| rdf-store-neo4j | ||
| rdf-store-oxigraph | ||
| rdf-store-postgres | ||
| rdf-store-qlever | ||
| rdf-store-sqlite | ||
| rdf-store-turso | ||
| rdf-store-valkey | ||
| rdf-store-virtuoso |
👨💻 Development