# txn-db v0.8.0 — Alpha: the lazy path

**The single-operation common case is now one call.** v0.8.0 is the alpha in the
run to 1.0: the feature-complete, hardened, API-frozen engine of 0.7 gains the
one ergonomic the simple-API mandate still wanted — autocommit `get` / `put` /
`delete` — plus broader fuzzing of the durable parse path. Additive and
MINOR-compatible: no existing signature changed.

## What is txn-db?

A multi-version concurrency control (MVCC) transaction engine: the layer that
turns a key-value store into a transactional database. Every write produces a new
version tagged with a commit timestamp, so readers get a stable snapshot without
ever blocking writers, and writers detect conflicts at commit time. The version
store is a trait, so the engine composes on top of any backend that can keep
timestamped versions.

## What's new in 0.8.0

### The autocommit lazy path

A single read or write no longer needs the begin/commit ceremony:

```rust
use txn_db::Db;

let db = Db::new();
db.put(b"k".to_vec(), b"v".to_vec())?;
assert_eq!(db.get(b"k")?.as_deref(), Some(&b"v"[..]));
db.delete(b"k".to_vec())?;
assert_eq!(db.get(b"k")?, None);
# Ok::<(), txn_db::TxnError>(())
```

- `Db::get` takes a snapshot and reads one key.
- `Db::put` and `Db::delete` run in their own transaction and **retry on
  conflict** — last-writer-wins, so they never surface a conflict and the write
  always lands.

When several operations must be atomic, or you want to control the conflict
outcome yourself, `Db::begin` and the full `Transaction` surface are unchanged.
This is the lazy tier of the tiered API: the simplest case in one call, the full
power one step away.

### Broader parse-path fuzzing

The durable commit-record decoder — the one place that turns bytes back into
state on recovery — now has property tests that throw arbitrary byte strings at
it (it must never panic or over-allocate), round-trip arbitrary commits through
encode/decode, and confirm any trailing bytes are rejected. This complements the
existing truncation, bad-tag, and implausible-length tests, exercising the
recovery parse path the way REPS asks parse/recovery paths to be fuzzed.

## Breaking changes

**None.** The autocommit methods are additive; every existing signature is
unchanged, and the API freeze from 0.7 holds.

## Verification

Run on Windows x86_64 (Rust stable 1.95.x and MSRV 1.85) and on Linux (WSL2
Ubuntu); the configured CI matrix runs the same on Linux, macOS, and Windows:

```bash
cargo fmt --all -- --check
cargo clippy --all-targets --all-features -- -D warnings
cargo test --all-features
cargo test                       # default features
RUSTDOCFLAGS="-D warnings" cargo doc --no-deps
RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features
cargo +1.85 clippy --all-targets --all-features -- -D warnings
cargo +1.85 test --all-features
RUSTFLAGS="--cfg loom" cargo test --test loom_txn --release
cargo deny check
cargo audit
```

All green. The autocommit path is covered by unit tests (including a contended
last-writer-wins stress test) and the parse-path fuzzing by property tests.

## What's next

- **0.9.0–0.9.4 — Beta.** Bug fixes and broader testing as real consumers
  integrate; final benchmarks captured. No new surface.
- **0.9.5+ — RC.** Critical fixes and documentation polish only.
- **1.0.0 — Stable.** Published with the API and on-disk format frozen.

The engine is feature-complete, hardened, and API-frozen; the path to 1.0 is a
soak against real-world use, not more features.

## Installation

```toml
[dependencies]
txn-db = "0.8"

# Opt into serializable isolation and/or a durable commit log:
txn-db = { version = "0.8", features = ["serializable", "durability"] }
```

MSRV: Rust 1.85 (the 2024 edition).

## Documentation

- [README](https://github.com/jamesgober/txn-db/blob/main/README.md)
- [API Reference](https://github.com/jamesgober/txn-db/blob/main/docs/API.md)
- [Performance](https://github.com/jamesgober/txn-db/blob/main/docs/PERFORMANCE.md)
- [CHANGELOG](https://github.com/jamesgober/txn-db/blob/main/CHANGELOG.md)

---

**Full diff:** [`v0.7.0...v0.8.0`](https://github.com/jamesgober/txn-db/compare/v0.7.0...v0.8.0).
**Changelog:** [`CHANGELOG.md`](https://github.com/jamesgober/txn-db/blob/main/CHANGELOG.md#080---2026-06-08).
