Crate pearl

source ·
Expand description


The pearl library is an asyncronous Append only key-value blob storage on disk. Crate pearl provides Futures 0.3 interface. Tokio runtime required. Storage follows no harm policy, which means that it won’t delete or change any of the stored data.


The following example shows a storage building and initialization. For more advanced usage see the benchmark tool as the example

use pearl::{Storage, Builder, Key};

struct Id(String);

impl AsRef<[u8]> for Id {
    fn as_ref(&self) -> &[u8] {

impl Key for Id {
    const LEN: u16 = 4;

async fn main() {
    let mut storage: Storage<Id> = Builder::new()
    let key = Id("test".to_string());
    let data = b"Hello World!".to_vec();
    storage.write(key, data).await.unwrap();


pub use filter::Bloom;
pub use filter::BloomDataProvider;
pub use filter::BloomProvider;
pub use filter::Config as BloomConfig;
pub use filter::FilterResult;
pub use error::Error;
pub use error::Kind as ErrorKind;
pub use rio;


Basic info about current build.
Types representing various errors that can occur in pearl.
bloom filter for faster check record contains in blob


Is used to initialize a Storage.
Entry is a [Future], which contains header and metadata of the record, but does not contain all of the data in memory.
Struct representing additional meta information. Helps to distinguish different version of the records with the same key.
A main storage struct.


Trait Key