Thanks to visit codestin.com
Credit goes to lib.rs

26 releases (11 breaking)

new 0.13.0 May 22, 2026
0.10.1 May 16, 2026

#1547 in Parser implementations


Used in 5 crates (3 directly)

BUSL-1.1

1MB
21K SLoC

LoraDB

LoraDB

The graph database for connected systems.

An in-process graph store with a Cypher-like query engine — small enough to embed in an agent, a robot, or a stream processor.

CI Tests Release crates.io npm PyPI License: BUSL-1.1 Docs

Embedded · Rust · Cypher-like  ·  Rust · Node · Python · WASM · Go · Ruby · HTTP  ·  Zero daemons · runs in your process  ·  Open source · readable end-to-end


Overview

LoraDB is an embeddable property-graph database written in Rust. It parses, analyzes, compiles, and executes a Cypher-like query language against an in-process graph store - with no daemons, no clusters, and no schema migrations. Optional CREATE INDEX / DROP INDEX DDL lets you declare secondary indexes for hot predicates without changing the schema-free data model. Optional snapshots, WAL directories, and named .loradb archives provide local durability on filesystem-backed surfaces. VECTOR is a first-class value type, so embeddings live next to the graph they describe.

The graph belongs inside your process. Reach for LoraDB when you're building:

  • AI agents & LLM pipelines — context, memory, and tool graphs that live with the agent, with embeddings and similarity search on the same nodes
  • Robotics & scene graphs — local reasoning over typed relationships
  • Event pipelines & streams — graph-shaped state inside a stream processor
  • Real-time reasoning — read/write Cypher without standing up a database server
  • Embedded graph storage — ship graph queries in a single static binary or WASM module

Every stage of the pipeline — parser, analyzer, compiler, executor, store — is implemented in this workspace. No external query engine, readable end-to-end.

Installation

LoraDB ships a single Rust engine with bindings for the major application runtimes, plus a standalone HTTP server. Pick the surface that matches your host.

Rust (crates.io)

# Cargo.toml
[dependencies]
lora-database = "0.7"

 → crates.io/crates/lora-database

Node.js / TypeScript (npm)

npm install @loradb/lora-node

 → npmjs.com/package/@loradb/lora-node

Python (PyPI)

pip install lora-python

 → pypi.org/project/lora-python

WebAssembly (npm)

npm install @loradb/lora-wasm

 → npmjs.com/package/@loradb/lora-wasm

Go (Go modules)

go get github.com/lora-db/lora/crates/bindings/lora-go

The Go binding is a thin cgo layer over lora-ffi; builds require the liblora_ffi static library on disk. See crates/bindings/lora-go/README.md for the local checkout path and the prebuilt-archive path.

Ruby (RubyGems)

gem install lora-ruby
# or in a Gemfile
gem "lora-ruby"

 → rubygems.org/gems/lora-ruby

Standalone server (GitHub Releases)

Prebuilt lora-server binaries for Linux, macOS (Intel + Apple Silicon), and Windows are attached to every tagged release.

 → github.com/lora-db/lora/releases

Quick start

Node.js

import { createDatabase } from "@loradb/lora-node";

const db = await createDatabase();

await db.execute(`
  CREATE (a:User {name: 'Alice'}),
         (b:User {name: 'Bob'}),
         (a)-[:FOLLOWS {since: 2024}]->(b)
`);

const result = await db.execute(`
  MATCH (a:User)-[:FOLLOWS]->(b:User)
  RETURN a.name AS follower, b.name AS followee
`);

console.log(result.rows);

Index hot predicates

CREATE INDEX user_email FOR (u:User) ON (u.email);
CREATE TEXT INDEX user_name FOR (u:User) ON (u.name);
CREATE POINT INDEX venue_location FOR (v:Venue) ON (v.location);

SHOW INDEXES;

The optimizer can use declared RANGE, TEXT, and POINT indexes for matching node or relationship predicates such as equality/range comparisons, string prefix/substring/suffix filters, and point.withinBBox(...) / point.distance(...) <= radius.

Python

from lora_python import Database

db = Database.create()
db.execute("CREATE (:User {name: 'Alice'})")

result = db.execute("MATCH (n:User) RETURN n.name AS name")
print(result["rows"])

Go

package main

import (
    "fmt"
    "log"

    lora "github.com/lora-db/lora/crates/bindings/lora-go"
)

func main() {
    db, err := lora.New()
    if err != nil { log.Fatal(err) }
    defer db.Close()

    if _, err := db.Execute(
        "CREATE (:User {name: $n})",
        lora.Params{"n": "Alice"},
    ); err != nil { log.Fatal(err) }

    r, err := db.Execute("MATCH (n:User) RETURN n.name AS name", nil)
    if err != nil { log.Fatal(err) }

    fmt.Println(r.Columns, r.Rows)
}

Ruby

require "lora_ruby"

db = LoraRuby::Database.create
db.execute("CREATE (:User {name: $n})", { n: "Alice" })

result = db.execute("MATCH (n:User) RETURN n.name AS name")
puts result["rows"]

Rust

use lora_database::Database;

let db = Database::in_memory();
db.execute("CREATE (:User {name: 'Alice'})", None)?;

let result = db.execute("MATCH (n:User) RETURN n.name", None)?;

HTTP (standalone server)

cargo run --bin lora-server
# => LoraDB server running at http://127.0.0.1:4747

curl -s http://127.0.0.1:4747/query \
  -H 'Content-Type: application/json' \
  -d '{"query": "CREATE (:User {name: \"Alice\"}) RETURN *"}'

Result formats: rows, rowArrays, graph (default), combined. The HTTP body does not yet accept params; use an in-process binding for parameterized queries. See loradb.com for the full API.

Documentation

📖 loradb.com — language reference, cookbook, function catalogue, and API guides.

In-repo references:

Area Link
Architecture overview docs/architecture/overview.md
Graph engine internals docs/architecture/graph-engine.md
Cypher support matrix docs/reference/cypher-support-matrix.md
Query indexes apps/loradb.com/docs/queries/indexes.md
Value model docs/internals/value-model.md
Adding Cypher features docs/internals/cypher-development.md
Known limitations docs/design/known-risks.md
Release process RELEASING.md

Development setup

LoraDB is a Cargo workspace with Node, Python, WASM, Go, and Ruby bindings hanging off dedicated crates, plus a shared lora-ffi C ABI that the Go binding links against.

Prerequisites

  • Rust stable (pinned in rust-toolchain.tomlrustfmt + clippy components)
  • Node.js 20+ (only for lora-node, lora-wasm, and the loradb.com site)
  • Python 3.8+ with maturin (only for lora-python)
  • Go 1.21+ and a C toolchain with cgo enabled (only for lora-go)
  • Ruby 3.1+ with bundler (only for lora-ruby)

Clone and bootstrap

git clone https://github.com/lora-db/lora.git
cd lora
cargo build --workspace

Repository layout

lora/
├── crates/
│   ├── lora-ast/         AST types
│   ├── lora-parser/      PEG grammar + lowering
│   ├── lora-analyzer/    Semantic analysis
│   ├── lora-compiler/    Logical + physical planning
│   ├── lora-executor/    Plan interpreter
│   ├── lora-store/       In-memory graph, value types, mutation events
│   ├── lora-snapshot/    Columnar snapshot codec
│   ├── lora-wal/         Write-ahead log segments and replay
│   ├── lora-database/    Pipeline entry point, transactions, durability
│   ├── lora-server/      Axum HTTP server
│   └── bindings/
│       ├── lora-ffi/     C ABI over lora-database (used by lora-go)
│       ├── lora-node/    Node.js bindings (napi-rs)
│       ├── lora-python/  Python bindings (PyO3 / maturin)
│       ├── lora-wasm/    WebAssembly bindings
│       ├── lora-go/      Go bindings (cgo over lora-ffi)
│       ├── lora-ruby/    Ruby bindings (Magnus / rb-sys)
│       └── shared-ts/    Shared TypeScript types for lora-node + lora-wasm
├── apps/loradb.com/      Documentation site (Docusaurus)
└── docs/                 Design docs and internals

Building

# Full workspace
cargo build --workspace

# Release build of the HTTP server
cargo build --release --bin lora-server

# Node.js bindings
cd crates/bindings/lora-node && npm run build

# Python bindings (produces a wheel)
cd crates/bindings/lora-python && maturin build --release

# WebAssembly bindings
cd crates/bindings/lora-wasm && npm run build

# Shared FFI (static library consumed by lora-go)
cargo build --release -p lora-ffi

# Go bindings (requires lora-ffi built above)
cd crates/bindings/lora-go && go test -race ./...

# Ruby bindings (native extension via rb-sys)
cd crates/bindings/lora-ruby && bundle install && bundle exec rake compile

Testing

cargo test --workspace        # Rust unit + integration tests
cargo clippy --workspace      # Lints
cargo fmt --all --check       # Formatting
cargo bench                   # Criterion benchmarks

Integration coverage lives in crates/lora-database/tests/ (one file per feature area) and crates/lora-server/tests/http.rs. Benchmarks are Criterion-driven and tracked by the benchmarks workflow — see docs/performance/benchmarks.md.

CI/CD

LoraDB ships via GitHub Actions. Every push and pull request runs the full quality gate; tagged releases fan out to crates.io, npm, PyPI, and GitHub Releases.

Workflow Purpose
workspace-quality cargo fmt, clippy, test --workspace on every PR
lora-node Build + test Node.js bindings across platforms
lora-python Build + test Python wheels across platforms
lora-wasm Build + test WebAssembly bindings
lora-go Build lora-ffi, run go vet + go test -race on the Go binding
lora-ruby Compile the Ruby native extension + run rake test across Ruby versions
lora-server Build standalone server binaries
benchmarks Criterion performance regression tracking
release Tag-driven release of server binaries
packages-release Tag-driven publish of npm / PyPI / RubyGems + verify-only path for the Go module
cargo-release crates.io publish orchestration
loradb-docs Deploys loradb.com
commitlint Conventional-commit enforcement

Conventional Commits are enforced on every PR via commitlint + Husky. Local Husky commits also run cargo fmt --all --check and cargo clippy --workspace -- -D warnings before commitlint. Releases are driven by git-cliff — see RELEASING.md.

Contributing

Contributions are welcome. Before opening a PR, please read CONTRIBUTING.md and SECURITY.md.

  • Use Conventional Commits (feat:, fix:, docs:, …) — enforced by commitlint
  • Run cargo fmt --all --check, cargo clippy --workspace -- -D warnings, and cargo test --workspace before pushing
  • Open an issue first for anything larger than a bug fix or docs change

License

LoraDB is licensed under the Business Source License 1.1. Each covered release converts to Apache 2.0 on its Change Date (April 19, 2029 for the current release line).

You can use LoraDB for development, testing, evaluation, internal business use, internal production, and embedded in your own applications. You can't offer LoraDB as database-as-a-service, a hosted API for third parties, or a competing resale offering. See docs/license/usage.md for plain-English guidance.

The apps/loradb.com documentation site is separately MIT-licensed.


Website · Docs · Playground · GitHub · Issues
© LoraDB, Inc. — Built in Rust. Embeddable by design.

Dependencies

~2.2–3.5MB
~64K SLoC