SMILING TREE LOGO


sled
github repo
introduction
documentation
motivating experiences
book shop
support sled

blog
API considerations
error handling in Rust
jepsen-proof engineering
theoretical performance guide

sled

github documentation chat sponsors

A modern embedded database. Written in Rust, usable on servers and phones from any C-compatible language.

let db = sled::open(path)?; // as in fs::open
db.insert(k, v)?;           // as in BTreeMap::insert
db.get(&k)?;                // as in BTreeMap::get
for kv in db.range(k..) {}  // as in BTreeMap::range
db.remove(&k)?;             // as in BTreeMap::remove
drop(db);                   // fsync and close file

Embedded databases are useful in several cases:

sled features

references