Skip to content

v0.4.0 — builder, FlushPolicy, RecoveryReport, for_each_from, typed Io, examples, ops

Choose a tag to compare

@LarsArtmann LarsArtmann released this 19 Jul 08:58
· 240 commits to master since this release

The "API ergonomic + perf" release. Completes the 35-task v0.3.0 plan.

Breaking

  • SegmentConfig lost max_batch_events and flush_interval, gained flush_policy: FlushPolicy. Migration via builder.
  • SegmentError::Io is now a struct variant { path: Option<PathBuf>, source: io::Error }.

Added

  • SegmentConfig::builder() with fluent setters
  • FlushPolicy enum (Batch / Interval / BatchOrInterval / Manual)
  • RecoveryReport + open_with_report()
  • for_each_from(start, limit, F) lending iterator (~21× faster than read_from on in-memory items)
  • Typed SegmentError::Io { path, source } with with_path() helper
  • examples/crash_recovery.rs, examples/mpmc.rs
  • .github/workflows/nix.yml, deny.toml, renovate.json, release.toml

Changed (internal)

  • approx_disk_bytes is AtomicU64 outside BufferInner; flush/store_pressure drop the second lock
  • scan_segments() results cached; invalidated by mutating ops
  • Tracing fields standardized on path/seq/bytes

Verified

49 unit + 25 doc tests pass. fmt/clippy/doc clean. cargo-deny ok across advisories/licenses/bans/sources. MSRV 1.85 verified locally. Both fuzz targets pass. Two new examples (crash_recovery, mpmc) run cleanly.

See CHANGELOG for the full change history.