#storage #protocol #api #store #key-value #traits #objects #part

tari_storage

Key-Value store API for the Tari project

10 unstable releases (3 breaking)

0.8.1 Jan 29, 2021
0.2.7 Oct 12, 2020
0.2.1 Aug 13, 2020
0.2.0 Jul 15, 2020
0.0.5 Sep 2, 2019
Download history 36/week @ 2021-02-15 20/week @ 2021-02-22 12/week @ 2021-03-01 9/week @ 2021-03-08 8/week @ 2021-03-15 28/week @ 2021-03-22 35/week @ 2021-03-29 19/week @ 2021-04-05 26/week @ 2021-04-12 60/week @ 2021-04-19 9/week @ 2021-04-26 20/week @ 2021-05-03 6/week @ 2021-05-10 25/week @ 2021-05-17 4/week @ 2021-05-24 14/week @ 2021-05-31

94 downloads per month
Used in 10 crates (7 directly)

BSD-3-Clause

140KB
2K SLoC

Tari Storage

This crate is part of the Tari Cryptocurrency project.

An abstraction layer for persistent key-value storage. The Tari domain layer classes should only make use of these traits and objects and let the underlying implementations handle the details.

DataStore

Provides a general CRUD behaviour of Key-Value Store implementations. Datastore is agnostic of the underlying implementation.

LMDB

Currently, Tari supports LMDB for local disk persistence.

Use LMDBBuilder to open/create a new database.

# use tari_storage::lmdb::LMDBBuilder;
let mut store = LMDBBuilder::new()
    .set_path("/tmp/")
    .set_mapsize(500)
    .add_database("db1")
    .add_database("db2")
    .build()
    .unwrap();

Dependencies

~3.5–4.5MB
~90K SLoC