10 releases

1.0.0-rc.5 Feb 9, 2024
0.8.1 Jan 29, 2021
0.2.7 Oct 12, 2020
0.2.0 Jul 15, 2020
0.0.5 Sep 2, 2019

#152 in Database interfaces

Download history 50/week @ 2023-10-30 40/week @ 2023-11-06 56/week @ 2023-11-13 57/week @ 2023-11-20 50/week @ 2023-11-27 43/week @ 2023-12-04 46/week @ 2023-12-11 41/week @ 2023-12-18 58/week @ 2023-12-25 27/week @ 2024-01-01 36/week @ 2024-01-08 48/week @ 2024-01-15 37/week @ 2024-01-22 37/week @ 2024-01-29 74/week @ 2024-02-05 112/week @ 2024-02-12

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

BSD-3-Clause

70KB
1K 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

~1.6–2.3MB
~49K SLoC