31 releases

0.6.2 Sep 14, 2021
0.5.14 Apr 14, 2021
0.5.12 Mar 30, 2021
0.5.4 Oct 28, 2020
0.2.0 Nov 28, 2019

#37 in Filesystem

Download history 30/week @ 2021-06-07 3/week @ 2021-06-14 30/week @ 2021-06-21 3/week @ 2021-06-28 4/week @ 2021-07-05 28/week @ 2021-07-12 69/week @ 2021-07-19 78/week @ 2021-07-26 118/week @ 2021-08-02 86/week @ 2021-08-09 135/week @ 2021-08-16 229/week @ 2021-08-23 67/week @ 2021-08-30 165/week @ 2021-09-06 185/week @ 2021-09-13 27/week @ 2021-09-20

339 downloads per month

MIT and GPL-3.0 licenses

125KB
3K SLoC

Pearl

build tests Crate Status Docs Status

Append only key-value blob storage on disk

Table of Contents

Overview

Storage scheme

pearl storage scheme

Blob

Header

Structure:

struct Header {
    magic_byte: u64,
    version: u32,
    flags: u64,
}

Description

Field Size, B Description
magic_byte 8 marks pearl blob
version any used to check compatibility
flags 1 additional file props

Record

Header

Structure:

pub struct Header {
    magic_byte: u64,
    key: Vec<u8>,
    meta_size: u64,
    data_size: u64,
    flags: u8,
    blob_offset: u64,
    created: u64,
    data_checksum: u32,
    header_checksum: u32,
}

Description

Field Size, B Description
magic_byte 8 separates records in blob
key (any) key for record location and searching
meta_size 8 meta length
data_size 8 data length (without header)
flags 1 additional record metadata
blob_offset 8 record offset from blob start
created 8 created timestamp
data_checksum 4 data crc32 checksum (without header)
header_checksum 4 header crc32 checksum (only record header)

Rust Version

pearl works on stable rust and above

$ rustup update
$ cargo build

Dependencies

~15MB
~348K SLoC