smolheed
A thin wrapped on top of LMDB with minimum overhead. It is derived from the heed crate which is more typed and a little bit more complex.
It provides you a way to store key/values in LMDB without any limit and with a minimal overhead.
Example Usage
create_dir_all?;
let env = new.open?;
// We open the default unamed database.
// Specifying the type of the newly created database.
// Here we specify that the key is an str and the value a simple integer.
let db = env.create_database?;
// We then open a write transaction and start writing into the database.
// All of those puts are type checked at compile time,
// therefore you cannot write an integer instead of a string.
let mut wtxn = env.write_txn?;
db.put?;
db.put?;
db.put?;
db.put?;
wtxn.commit?;
// We open a read transaction to check if those values are available.
// When we read we also type check at compile time.
let rtxn = env.read_txn?;
let ret = db.get?;
assert_eq!;
let ret = db.get?;
assert_eq!;
You want to see more about all the possibilities? Go check out the examples.