Local ownership
Run the database and authenticate locally. Your application can keep reading and writing when the network is down.
A place to store your shiny things.
A lightweight, durable, offline-first document database built in Rust. From everyday applications to the computing frontier.
RatDB stores JSON documents on your own machine. Give each document an ID, save it, and read it back after a restart. Documents in the same collection can have different fields.
Use it for a small application that needs to keep working offline, or link the storage engine directly into a Rust program that owns its data.
Run the database and authenticate locally. Your application can keep reading and writing when the network is down.
Insert a new ID, replace a document, or update selected fields. Find matches by field value and browse a collection in bounded pages.
Writes publish a checksummed snapshot. Stop the server to make a verified backup, then restore it to a fresh file.
An instance is the running service. Each warren is a logical database. A den collects related documents inside it. The individual document you save is a shiny.
instance
└── garage warren
└── cars den
├── car:001 shiny
└── car:002 shinyDownload the alpha, extract the binary, and put it on your PATH. Initialize a new instance and choose an administrator password when prompted.
Leave the server running. In a second terminal, run ratdb and sign in as admin. Then enter the shell commands shown here.
ratdb init
ratdb serveuse garage/cars
put car:001 {"make":"Ford","year":2021}
get car:001
{
"id": "car:001",
"make": "Ford",
"year": 2021
}Open the database directly when one application owns the file. The embedded API can commit a bounded set of changes across multiple documents in a single write batch.
Start ratdb serve to share an instance between the shell and applications. Rust and Python clients authenticate once per connection. For a remote machine, use an encrypted SSH tunnel to its loopback listener.
The Rust core can run with an allocator and a storage adapter. The adapter supplies exact reads and writes, resizing, and a durable flush. Asterhold could provide those operations through its own filesystem or block service.
Mock filesystem and block-device adapters pass the host tests. The core also compiles for bare-metal ARM. Runs on Asterhold and physical target boards are future milestones.
RatDB 0.1.0 is an alpha for evaluation.
Each commit still rewrites the live snapshot into the alternate bank. Capacity is fixed, and heavy write workloads become more expensive as the data grows. Network commands commit individually, and separate cursor pages can observe different committed states.
Process termination and simulated storage failures have been tested. Physical power cuts, extended endurance runs, and real Asterhold hardware remain open. The roadmap lists the evidence required for each milestone.