segment-buffer 0.4.1

Durable bounded queue with zstd+CBOR segment files, ack-based deletion, and crash recovery
Documentation
[package]
name = "segment-buffer"
version = "0.4.1"
edition = "2021"
rust-version = "1.85"
authors = ["Lars Artmann <lars@larsartmann.com>"]
license = "Apache-2.0"
description = "Durable bounded queue with zstd+CBOR segment files, ack-based deletion, and crash recovery"
repository = "https://github.com/LarsArtmann/segment-buffer"
homepage = "https://github.com/LarsArtmann/segment-buffer"
documentation = "https://docs.rs/segment-buffer"
readme = "README.md"
keywords = ["queue", "disk", "durable", "segment", "buffer"]
categories = ["data-structures", "filesystem"]
exclude = ["/target", "/.github", "/fuzz", "/benches"]

[features]
default = []
encryption = ["dep:aes-gcm", "dep:rand"]
# Enable `loom` to compile the crate under loom's concurrency model. parking_lot
# 0.12 detects `--cfg loom` at compile time (no cargo feature needed) and
# switches its `Mutex<T>` to `loom::sync::Mutex<T>` automatically. Run with:
#
#   RUSTFLAGS="--cfg loom" cargo test --features loom --test loom -- --release
#
# Loom does NOT model the filesystem, so the loom test only exercises the
# in-memory append/stats path; flush/delete_acked/recover (which touch disk)
# stay covered by the stress test `concurrency_4_writers_1_reader_10k_events`.
loom = []

[lints.rust]
# `loom` is set via RUSTFLAGS, not Cargo features, so rustc's check-cfg needs
# to be told it exists to avoid the `unexpected_cfgs` warning under loom runs.
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(loom)'] }

[dependencies]
ciborium = "0.2"
zstd = "0.13"
parking_lot = "0.12"
tracing = "0.1"
thiserror = "2"
serde = "1"
aes-gcm = { version = "0.10", optional = true }
rand = { version = "0.8", optional = true }

[dev-dependencies]
tempfile = "3"
serde = { version = "1", features = ["derive"] }
criterion = { version = "0.5", default-features = false, features = ["cargo_bench_support"] }
proptest = "1"
loom = "0.7"

[[example]]
name = "encrypted"
required-features = ["encryption"]

[[bench]]
name = "bench_append"
harness = false

[[bench]]
name = "bench_read_from"
harness = false

[[bench]]
name = "bench_delete_acked"
harness = false

[[bench]]
name = "bench_recover"
harness = false

[[bench]]
name = "bench_stats"
harness = false

[[bench]]
name = "bench_read_vs_for_each"
harness = false

[[bench]]
name = "bench_append_all"
harness = false