Maybe sled: https://crates.io/crates/sled
this post was submitted on 29 Jun 2022
23 points (92.6% liked)
Rust Programming
8140 readers
16 users here now
founded 5 years ago
MODERATORS
Exactly this, thank you!
I did not try them but perhaps you can check:
I was hoping for BerkeleyDB or Kyoto Cabinet bindings that I have used in my Ruby times for this purpose but nothing there that looks maintained.
You are probably looking for a database (possibly an embedded database) that supports a key/value or document store. Using those keywords will let you find things similar to what you are looking for.
But some you might want to look at are:
- Surrealdb which will give you a document, relational or graph storage/querying and it also supports embedding in rust application in addition to running as a stand alone service (with multinode support). This is the most flexible option in how you run it and what you can do with this.
- Bonsaidb is another document database that can run stand-alone and I think can be embedded as well.
- Sled which a simpler embedded key/value store.
- Persy which is a embedded key/value storage engine for rust.
Then there is always redis which is the standard key/value store or really data structures as a service solution for most languages and sees a lot of production use. This is stand-alone service only though and cannot be embedded in a rust binary.