#write-ahead-log #wal #append-only #bitcask #log-structured #append-only-log

no-std orderwal

A generic-purpose, atomic, ordered, zero-copy read, zero-cost (in-place) write, Write-Ahead Log implementation for Rust

5 releases (breaking)

0.5.1 Nov 2, 2024
0.5.0 Nov 2, 2024
0.4.1 Oct 8, 2024
0.4.0 Sep 30, 2024
0.1.1 Sep 15, 2024

#144 in Database implementations

Download history 389/week @ 2024-09-14 167/week @ 2024-09-21 303/week @ 2024-09-28 173/week @ 2024-10-05 33/week @ 2024-10-12 1/week @ 2024-10-19 238/week @ 2024-11-02 9/week @ 2024-11-09 3/week @ 2024-11-16

250 downloads per month

MIT/Apache

440KB
12K SLoC

OrderWAL

A generic-purpose, atomic, ordered, zero-copy read, zero-cost (in-place) write, Write-Ahead Log implementation for Rust.

github LoC Build codecov

docs.rs crates.io crates.io license

English | 简体中文

Introduction

orderwal is generic-purpose, atomic, ordered, zero-copy read, zero-cost (in-place) write, concurrent-safe, pre-allocate style (memory map) write-ahead-log for developing databases.

orderwal also supports generic structured key and value types, which is not limited to just bytes like other implementations.

Installation

  • Default (with on-disk support)

    [dependencies]
    orderwal = "0.5"
    
  • std only (without on-disk support)

    [dependencies]
    orderwal = { version = "0.5", default-features = false, features = ["std"] } 
    
  • no-std (alloc required)

    [dependencies]
    orderwal = { version = "0.5", default-features = false, features = ["alloc"] }
    

Example

See examples for more information.

  • aol: Yet another generic purpose, append-only write-ahead log implementation based on std::fs::File.
  • skl: A lock-free, ARNEA based skiplist implementation, which supports in-memory and on-disk, suitable for frozen durable data file or memtable for LSM database.
  • valog: A lock-free, generic, lightweight value log for WiscKey or Bitcask architecture databases.
  • dtlog: A log for tracking discard stats of multi-files databases.

License

orderwal is under the terms of both the MIT license and the Apache License (Version 2.0).

See LICENSE-APACHE, LICENSE-MIT for details.

Copyright (c) 2024 Al Liu.

Dependencies

~3–13MB
~164K SLoC