Pure-rust key/value store based on BoltDB
APACHE-2.0 License
Ozone is a pure-rust key/value store based on BoltDB and inspired by the language's built-in concept of memory ownership.
The goal of this project is to build a perfectly idiomatic persistence layer using the standard library's collections::BTreeMap as a model, letting the language itself do as much as possible.
Specific features that will be implemented include:
This is my first real Rust project, so any hints, suggestions, and nudges are very welcome.
I'm starting as simple as possible, but this will change
// Open a database file (creating if nonexistant)
let db = ozone::open("my.db").unwrap();
// DB is essentially a collections::BTreeMap<&str, Bucket>
let mut bucket : Bucket = db.entry("bucket-name");
// Bucket is essentially a collections::BTreeMap<&str, &str>
let old_value : Option<str> = bucket.insert("key-name", "value");
// Bucket is essentially a collections::BTreeMap<&str, &str>
let value : Option<str> = bucket.get("key-name");
Ozone, or O3 is a powerful oxidant (oxidation/reduction is the chemical process of rusting) that is naturally created from O2 (the stuff we breathe) when a bolt of lightning strikes.
I'm writing this to glean a deeper understanding of persistant storage techniques and to get more experience with Rust. Don't even think about using this in production :)
Licensed under either of
at your option.
Unless you explicitly state otherwise, any contribution intentionally submitted for inclusion in the work by you, as defined in the Apache-2.0 license, shall be dual licensed as above, without any additional terms or conditions.