[package]
name = "segment-buffer"
version = "0.5.3"
edition = "2021"
rust-version = "1.86"
authors = ["Lars Artmann <lars@larsartmann.com>"]
license = "Apache-2.0"
description = "High-throughput local buffer for cloud sync: batch-spills to zstd+CBOR segment files with at-least-once delivery, ack-based deletion, filename-based crash recovery, configurable durability, and optional encryption. Single-process by design. No WAL, no metadata DB."
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", "cloud-sync", "spool", "segment", "buffer"]
categories = ["data-structures", "filesystem"]
exclude = ["/target", "/.github", "/fuzz", "/benches"]
[package.metadata.docs.rs]
features = ["encryption"]
rustdoc-args = ["--cfg", "docsrs"]
[features]
default = []
encryption = ["dep:aes-gcm", "dep:chacha20poly1305", "dep:rand"]
fuzz = []
loom = []
[lints.rust]
unexpected_cfgs = { level = "warn", check-cfg = ['cfg(loom)', 'cfg(docsrs)'] }
[dependencies]
ciborium = "0.2"
zstd = "0.13"
parking_lot = "0.12"
tracing = "0.1"
thiserror = "2"
serde = "1"
fs4 = "1.1"
aes-gcm = { version = "0.11", optional = true }
chacha20poly1305 = { version = "0.11", optional = true }
rand = { version = "0.10", optional = true }
[dev-dependencies]
tempfile = "3"
serde = { version = "1", features = ["derive"] }
criterion = { version = "0.8", default-features = false, features = ["cargo_bench_support"] }
proptest = "1"
loom = "0.7"
[[example]]
name = "encrypted"
required-features = ["encryption"]
[[example]]
name = "bring_your_own_cipher"
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
[[bench]]
name = "bench_durability_policy"
harness = false