54 releases

0.21.0 Dec 18, 2023
0.20.0 Sep 23, 2023
0.19.0 May 16, 2023
0.18.0 Feb 26, 2023
0.2.0 Nov 28, 2019

#172 in Filesystem

Download history 79/week @ 2023-10-27 20/week @ 2023-11-03 3/week @ 2023-11-10 27/week @ 2023-11-17 56/week @ 2023-11-24 208/week @ 2023-12-01 8/week @ 2023-12-08 121/week @ 2023-12-15 258/week @ 2023-12-22 135/week @ 2023-12-29 14/week @ 2024-01-05 62/week @ 2024-01-12 74/week @ 2024-01-19 148/week @ 2024-01-26 69/week @ 2024-02-02 59/week @ 2024-02-09

395 downloads per month

MIT and maybe GPL-3.0

410KB
10K 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

~6–9MB
~168K SLoC