jammdb
Just Another Memory Mapped Database
jammdb
is an embedded, single-file database that allows you to store key / value pairs as bytes.
It started life as a Rust port of Ben Johnson's awesome BoltDB, which was inspired by Howard Chu's LMDB, so please check out both of these awesome projects!
jammdb
offers
ACID compliance,
serializable and
isolated transactions,
with multiple lock-free readers and a single concurrent writer. The data is organized in a
single level B+ tree
so random and sequential reads are very fast. The underlying file is memory mapped,
so reads require no additional memory allocation.
Supported platforms
jammdb
is continuously cross-compiled and tested on the following platforms:
x86_64-unknown-linux-gnu
(Linux)i686-unknown-linux-gnu
x86_64-unknown-linux-musl
(Linux MUSL)x86_64-apple-darwin
(OSX)x86_64-pc-windows-msvc
(Windows)i686-pc-windows-msvc
x86_64-pc-windows-gnu
i686-pc-windows-gnu
arm-linux-androideabi
(Android)aarch64-unknown-linux-gnu
(ARM)arm-unknown-linux-gnueabihf
mips-unknown-linux-gnu
(MIPS)x86_64-apple-ios
(iOS)
Examples
Here are a couple of simple examples to get you started, but you should check out the docs for more details.
Simple put and get
use ;
Storing structs
use ;
use ;
// use rmps crate to serialize structs using the MessagePack format
use ;
License
Available under both the Apache License or the MIT license.