RouchDB
A local-first document database with CouchDB replication protocol support.
RouchDB is the Rust equivalent of PouchDB — it provides a local document store that can sync bidirectionally with CouchDB and compatible servers.
Quick Start
use rouchdb::Database;
# async fn example() -> rouchdb::Result<()> {
// In-memory database (for testing)
let db = Database::memory("mydb");
// Persistent database (redb)
let db = Database::open("path/to/mydb.redb", "mydb")?;
// Put a document
let result = db.put("doc1", serde_json::json!({"name": "Alice"})).await?;
// Get a document
let doc = db.get("doc1").await?;
// Replicate to/from CouchDB
let remote = Database::http("http://localhost:5984/mydb");
db.replicate_to(&remote).await?;
# Ok(())
# }