Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
thingd
Core engine for thingd — an object-first data engine for applications and AI agents.
This crate provides the storage boundary: object CRUD, append-only events, durable job queues, full-text search, and graph links. It ships with two engines: an in-memory engine for fast prototyping and testing, and an optional persistent engine for durable local storage.
RocksDB is the default persistent backend. The experimental Rust-native ThingDB
backend can be selected through PersistentOpenOptions with
PersistentBackend::ThingDb; it uses a separate format and requires logical
repack rather than direct file opening. See the public storage backend guide.
The unified storage benchmark compares ThingDB RAM,
the MemoryEngine reference, RocksDB, and durable ThingDB with identical
seeded workloads. Results depend on the machine and dataset; ThingDB remains
experimental and benchmark results are not production performance claims.
Persistent callers can use PersistentEngine::open(path) for the existing
unencrypted behavior or PersistentEngine::open_with_options(path, options)
with an EncryptionConfig. Encryption uses a fallible KeyProvider; native
and CLI boundaries commonly use a validated 32-byte StaticKeyProvider.
Encryption is opt-in, fails closed on missing or wrong keys, and does not add
encryption fields to the logical engine API.
Why thingd?
Modern apps and AI agents commonly need:
- Object storage without designing relational schemas first
- Full-text search across objects and events
- Append-only event logs for audit trails and timelines
- Durable job queues with leases, retries, and dead-letter handling
- Graph links between objects, memories, and decisions
Today you stitch these together from 3-5 separate tools. thingd gives you all five primitives behind a single composable trait interface.
Feature Flags
| Feature | Default | Description |
|---|---|---|
persistent |
Yes | Enables the durable persistent engine |
connectors |
No | Enables CSV/JSON file connectors for data import |
Persistent storage can be opened with an explicit EncryptionConfig through
PersistentEngine::open_with_options. The engine uses authenticated
encryption, validates keys at startup, and fails closed when the key is missing
or wrong. Key retrieval remains the caller's responsibility.
Quick Start
In-memory engine (zero setup)
use ;
let mut engine = new;
engine.put_object.unwrap;
let user = engine.get_object.unwrap;
assert_eq!;
persistent engine (durable storage)
use ;
let mut db = open.unwrap;
db.put_object.unwrap;
let user = db.get_object.unwrap;
assert_eq!;
Full-text search
use ;
let mut db = open.unwrap;
db.put_object.unwrap;
db.put_object.unwrap;
let hits = db.search.unwrap;
assert!;
Append-only events
use ;
let mut db = open.unwrap;
db.append_event.unwrap;
Durable job queues
use ;
let mut db = open.unwrap;
let job = new.into;
db.push_job.unwrap;
let claimed = db.claim_job_with_options.unwrap;
assert!;
db.ack_job.unwrap;
Graph links
use ;
let mut db = open.unwrap;
db.create_link.unwrap;
let neighbors = db.get_neighbors.unwrap;
assert_eq!;
Traits
The crate is built around composable traits:
| Trait | Description |
|---|---|
ObjectStore |
CRUD for versioned JSON objects in named collections |
EventLog |
Append-only event streams with sequence numbers |
QueueStore |
Job queues with lease/ack/nack lifecycle, retries, dead-letter |
Searcher |
Full-text search with collection filters and recency ranking |
LinkStore |
Typed graph links between objects |
ThingStore |
Super-trait combining all of the above |
Both MemoryEngine and PersistentEngine implement all storage traits.
Key Types
| Type | Description |
|---|---|
MemoryObject |
A versioned JSON object keyed by (collection, id) |
MemoryEvent |
An event with stream, type, body, and sequence number |
QueueJob |
A job with status, attempts, lease, and retry metadata |
SearchHit |
A search result with kind, collection, score, and body |
Link |
A typed directed edge between two object references |
ThingdError |
Error type (InvalidInput, NotFound, Conflict, Storage) |
Comparison
| Tool | Great at | Why thingd is different |
|---|---|---|
| PersistentEngine | durable local storage | object API, events, queues, search, graph, vectors |
| MongoDB | flexible documents | local-first, Rust, no server process |
| Redis / BullMQ | fast queues | durable local storage without Redis |
| LanceDB | vector search | broader memory runtime with events and queues |
| Diesel / SQLx | type-safe SQL | higher-level object/queue/event API |
License
Apache-2.0 — see LICENSE.