Expand description
RedDB umbrella crate.
This crate is the published face of RedDB: it hosts the red
binary and re-exports the workspace members so existing
use reddb::… import paths keep resolving after the workspace
split (PRD #54). The actual code lives in the four sibling
crates:
reddb-wire— connection-string parser + RedWire framesreddb-grpc-proto— generated tonic protobuf stubsreddb-server— engine, storage, runtime, replication, MCP, AI, server dispatchreddb-client— gRPC client + REPL used by the bins, plus the published high-level driver
Re-exports§
pub use reddb_wire as wire_proto;pub use reddb_client as client;
Modules§
- ai
- External AI provider integration primitives.
- api
- Public API layer for the RedDB crate.
- application
- auth
- Authentication & Authorization
- backup_
bootstrap - Env-driven
BackupBootstrap(issue #517). - catalog
- Logical catalog structures for the unified multi-structure model.
- cli
- config
- crypto
- ec
- engine
- Engine layer facade.
- geo
- Geographic computation module.
- grpc
- health
- Health and diagnostics types for RedDB services.
- index
- Index layer contracts and in-memory index catalogue.
- json
- json_
field SerializedJsonField— typed guard for JSON-envelope construction.- log
- High-performance append-only log collections.
- mcp
- MCP (Model Context Protocol) server for RedDB.
- modules
- physical
- Physical storage design primitives for RedDB’s deterministic on-disk layout.
- prelude
- regress
- Regression test harness — Post-MVP credibility item.
- replication
- Replication Module
- rpc_
stdio - JSON-RPC 2.0 line-delimited stdio mode for the
redbinary. - runtime
- Embedded runtime with connection pooling, scans and health.
- serde_
json - server
- Minimal HTTP server for RedDB management and remote access.
- service_
cli - sqlstate
- SQLSTATE error codes — Post-MVP credibility item.
- storage
- telemetry
- Structured logging façade over
tracing+tracing-subscriber. - utils
- wire
- wire_
proto - RedDB wire protocol vocabulary.
Macros§
Structs§
- Adjacency
Entry - An adjacency entry representing a single edge
- Admin
UseCases - Block
Reference - Capability
Set - Catalog
Model Snapshot - Catalog
Snapshot - Catalog
UseCases - Collection
Descriptor - Collection
Stats - Connection
Pool Config - Cross
Ref - A cross-reference between entities
- DslFilter
- A filter condition
- Edge
Data - Data for a graph edge
- Embedding
Slot - A slot for embedding a specific aspect of an entity
- Engine
Info - Engine
Stats - Entity
- A unified entity that can represent any storage type
- Entity
Id - Unique identifier for any entity in the unified storage
- Entity
UseCases - Export
Descriptor - Graph
Adjacency Index - Graph adjacency index for fast edge/neighbor lookups
- Graph
Query Builder - Builder for graph traversal queries
- Graph
UseCases - Grid
Layout - Grpc
Server Options - Grpc
TlsOptions - PEM-encoded TLS material for gRPC’s tonic-rustls server.
- Health
Issue - Health
Report - Hybrid
Query Builder - Builder for complex hybrid queries
- Index
Catalog - Index
Config - Index
Event - Index lifecycle event for tracking
- Index
Manager - Integrated Index Manager combining all index types
- Index
Metric - Index
Stats - Integrated
Index Config - Configuration for the integrated index system
- Integrated
Index Manager - Integrated Index Manager combining all index types
- Inverted
Index - Inverted index for full-text search
- Layout
Overrides - Optional per-toggle override applied after preset expansion.
- Layout
Toggles - Fully expanded layout toggles after applying a preset and overrides.
- Local
Backend - Local filesystem backend. Copies files between paths. This is the default backend – operates entirely on local disk.
- LogRouting
Overrides - Per-log destination overrides.
Nonekeeps the tier default. - Manager
Config - Configuration for the segment manager
- Manager
Stats - Manager statistics
- Manifest
Event - Manifest
Pointers - Match
Components - Score components from different query modes
- Metadata
- Metadata for an entity (key-value pairs)
- Metadata
Storage - Type-aware metadata storage
- Native
UseCases - Node
Data - Data for a graph node
- Physical
Analytics Job - Physical
Graph Projection - Physical
Index State - Physical
Layout - Physical
Metadata File - Query
- Query builder entry point. Start all queries with
Q::. - Query
Result - Result from a DSL query execution
- Query
Result Item - Single item in query results
- Query
UseCases - RedDB
- RedDB - Unified Database with Best-in-Class DevX
- RedDB
Engine - RedDB
Grpc Server - RedDB
Options - RedDB
Runtime - RedDB
Server - RefQuery
Builder - Builder for cross-reference traversal
- Replication
Config - Configuration for replication.
- RowData
- Data for a table row
- Runtime
Connection - Runtime
Filter - Runtime
Graph Centrality Result - Runtime
Graph Centrality Score - Runtime
Graph Clustering Result - Runtime
Graph Community - Runtime
Graph Community Result - Runtime
Graph Component - Runtime
Graph Components Result - Runtime
Graph Cycles Result - Runtime
Graph Degree Score - Runtime
Graph Edge - Runtime
Graph Hits Result - Runtime
Graph Neighborhood Result - Runtime
Graph Node - Runtime
Graph Path - Runtime
Graph Path Result - Runtime
Graph Pattern - Runtime
Graph Projection - Runtime
Graph Topological Sort Result - Runtime
Graph Traversal Result - Runtime
Graph Visit - Runtime
IvfMatch - Runtime
IvfSearch Result - Runtime
Query Result - Runtime
Query Weights - Runtime
Stats - Scan
Cursor - Scan
Page - Scan
Query Builder - Builder for full collection scans
- Schema
Manifest - Schema
UseCases - Scored
Match - A matched entity with score and source information
- Segment
Manager - Segment manager for a collection
- Segment
Stats - Segment statistics
- Server
Options - Server
Replication State - Replication state exposed to the HTTP server.
- ShmHandle
- Handle to the provisioned
-shmfile. Drop semantics intentionally minimal in this slice — callers must invokeSelf::detach_readerexplicitly to mirror the eventual mmap-backed lifecycle. - ShmHeader
- Similar
Result - Result of a similarity search
- Snapshot
Descriptor - Sparse
Vector - Sparse vector representation
- Store
- Unified storage for tables, graphs, and vectors
- Store
Stats - Statistics for UnifiedStore
- Superblock
Header - Table
Query Builder - Builder for table/collection queries
- Text
Search Builder - Builder for full-text search queries
- Text
Search Result - Result from a text search
- Tiered
Layout Paths - Deterministic paths derived from a data file and expanded layout.
- Time
Series Data - Time-series data point
- Time
Series Point Kind - Unified
Entity - A unified entity that can represent any storage type
- Unified
Segment Config - Configuration for segments
- Unified
Store - Unified storage for tables, graphs, and vectors
- Unified
Store Config - Configuration for UnifiedStore
- Vector
Data - Data for a vector
- Vector
Query Builder - Builder for vector similarity queries
- Vector
Search Result - Result from a vector similarity search
- WalPolicy
- Where
Clause - Fluent where clause for filter conditions
Enums§
- Artifact
State - Canonical artifact lifecycle states.
- Backend
Error - Error type for backend operations.
- Capability
- Collection
Model - Compaction
Policy - Edge
Direction - Edge direction for adjacency lookups
- Entity
Data - The actual data content of an entity
- Entity
Kind - The kind of entity (what storage type it belongs to)
- Filter
Op - Filter operation
- Filter
Value - Filter value
- Health
State - Index
Event Kind - Index
Kind - Index
Status - Status of an index operation
- Index
Type - Types of indices that can be managed
- Lifecycle
Event - Lifecycle events for monitoring
- LogDestination
- Where a log stream should be written.
- Manifest
Event Kind - Metadata
Query Filter - Filter for metadata queries
- Metadata
Type - Metadata type enumeration
- Metadata
Value - Metadata value types
- Native
Header Repair Policy - Password
Source - Result of password resolution
- RedDB
Error - RefType
- Types of cross-references between entities
- Replication
Role - Role of this RedDB instance in a replication cluster.
- Runtime
Filter Value - Runtime
Graph Centrality Algorithm - Runtime
Graph Community Algorithm - Runtime
Graph Components Mode - Runtime
Graph Direction - Runtime
Graph Path Algorithm - Runtime
Graph Traversal Strategy - Schema
Mode - Segment
Error - Segment error types
- Segment
State - Segment state in its lifecycle
- ShmProvision
State - Outcome of a provisioning attempt — distinguishes a clean takeover from a crash recovery for diagnostics and tests.
- Sort
Order - Storage
Layout - Storage layout preset for future tier-aware startup integration.
- Storage
Mode - Store
Error - Errors from UnifiedStore operations
- Traversal
Direction - Unified
Metadata Filter - Metadata filter operations
Constants§
- DEFAULT_
EXPORT_ RETENTION - DEFAULT_
MANIFEST_ EVENT_ HISTORY - DEFAULT_
METADATA_ JOURNAL_ RETENTION - Retention applied when the seq-N catalog journal is enabled at the
Maxtier. Seeseqn_journal_retention. - DEFAULT_
SNAPSHOT_ RETENTION - OPT_
IN_ METADATA_ JOURNAL_ RETENTION - Retention applied when the seq-N catalog journal is opt-in enabled outside
of the
Maxtier — keeps forensics surface minimal on lower tiers. - PHYSICAL_
METADATA_ PROTOCOL_ VERSION - REDDB_
FORMAT_ VERSION - REDDB_
PROTOCOL_ VERSION - SHM_
FILE_ SIZE - SHM_
HEADER_ SIZE - SHM_
MAGIC - SHM_
VERSION
Traits§
- Catalog
Service - DataOps
- Health
Provider - Index
Runtime - Query
Planner - Remote
Backend - Trait for remote storage backends.
- Runtime
Admin Port - Runtime
Catalog Port - Runtime
Entity Port - Runtime
Graph Port - Runtime
Native Port - Runtime
Query Port - Runtime
Schema Port - Unified
Segment - A unified segment that stores all entity types
Functions§
- clear_
keyring - Remove password from system keyring
- fold_
dwb_ into_ wal_ enabled - Whether the pager should fold DWB into WAL (no
<data>-dwbsidecar). Reads still tolerate the legacy sidecar so existing databases keep working through the flag flip. - fold_
pager_ meta_ enabled - Whether the pager should fold metadata into page 1 only and skip the
<data>-metasidecar shadow. Reads still tolerate the sidecar so existing databases keep working through the flag flip. - has_
keyring_ password - Check if keyring has a stored password
- meta_
json_ sidecar_ enabled - Whether new metadata writes should additionally emit the JSON sidecar.
Defaults to
false; opt-in viaset_meta_json_sidecar_enabledor theREDDB_META_JSON_SIDECAR=1env var (escape hatch for ad-hoc debugging of a non-Max instance). Reads always tolerate either JSON or binary. - provision_
shm - Provision the
-shmsubstrate for a data file. Idempotent; safe to call from every open. See module docs for the lock protocol. - read_
shm_ header - Read the current header without taking ownership. Returns
Ok(None)when the file does not exist; surfaces a real I/O error if the file is present but unreadable. - resolve_
password - Resolve password from multiple sources (priority order)
- save_
to_ keyring - Save password to system keyring
- seqn_
journal_ enabled - Whether new metadata saves should also emit a seq-N journal entry.
- seqn_
journal_ retention - Resolved retention bound for the seq-N journal. Falls back to env
REDDB_SEQN_JOURNAL_RETENTION, then toOPT_IN_METADATA_JOURNAL_RETENTION(4) — the conservative off-tier baseline. - set_
fold_ dwb_ into_ wal_ enabled - Process-wide opt-in for folding the double-write buffer into the WAL via
full-page-image (FPI) records. When enabled, the pager does not open or
write
<data>-dwb; recovery rebuilds torn pages from FPI records replayed before normal redo. Defaults off. - set_
fold_ pager_ meta_ enabled - Process-wide opt-in for folding pager metadata (page 1) into the datafile
without an adjacent
<data>-metashadow. When enabled, the corruption- recovery shadow at<data>-metais not written; readers trust page 1 (plus its overflow chain) as the single source of truth. Defaults off. - set_
meta_ json_ sidecar_ enabled - Process-wide opt-in for the legacy
<data>.meta.jsonsidecar. Call once at startup after resolving the active [StorageLayout]. - set_
seqn_ journal_ enabled - Process-wide opt-in for the seq-N catalog journal (
<data>.meta.rdbx.seq-Nsnapshot trail). Defaults off so non-Maxtiers don’t accumulate forensic artifacts. Tier wiring should call this withtrueforMax. Escape hatch:REDDB_SEQN_JOURNAL=1. - set_
seqn_ journal_ retention - Process-wide retention for the seq-N catalog journal. Tier wiring should
call this with
DEFAULT_METADATA_JOURNAL_RETENTION(32) forMaxandOPT_IN_METADATA_JOURNAL_RETENTION(4) for opt-in non-Maxuse.0resets to defaults (env or off-tier baseline). - set_
shm_ provisioning_ enabled - Process-wide opt-in for
<data>.shmprovisioning. Default off so existing single-writer flows (minimal) keep their current shape. Tier wiring should call this withtruewhentier >= Standard. Escape hatch:REDDB_SHM_PROVISION=1. - shm_
path_ for - Sibling path of the
-shmsubstrate file for a given data file. - shm_
provisioning_ enabled - Whether the open path should provision a
<data>.shmfile. - snapshot_
store
Type Aliases§
- Index
Catalog Snapshot - RedDB
Result - Unified
Segment Id - Unique identifier for a segment