stack-db
A (basically) infinitely stacking & extendable CoW database that has both readonly safety and incredible write speeds at the same time.
Examples
Example of a basic in-memory binary database
Here is a basic in-memory database that only deals with binary indexes and data (that uses the allocators provided by the library)
use *;
let allocator = SkdbMemAlloc; // or `SkdbDiskAlloc::new()`
let mut database = new.unwrap;
// writing
database.write.unwrap;
database.write.unwrap;
// reading
assert_eq!;
// flush to save all changes
database.flush.unwrap;
// over-writting
database.write.unwrap;
database.write.unwrap;
database.write.unwrap;
// flush again
database.flush.unwrap;
// reading
assert_eq!;
// rebase to save space
database.rebase.unwrap; // rebase with a 256 byte buffer