bloom-lib 1.0.0

Probabilistic data structure library: Bloom filters, Cuckoo filters, Count-Min Sketch, HyperLogLog, MinHash, and Top-K. Tunable false-positive rates, serializable state, merge support, and streaming-safe updates.
Documentation
# bloom-lib v0.9.0 — Hardening + Pre-1.0 Audit

**Feature freeze.** v0.9.0 adds no functionality. It is the mandatory pre-1.0
audit: a full pass over cleanliness, error hardening, API stability,
documentation, tests, performance, and supply-chain policy, with every finding
resolved. This document is the written audit report required before tagging 1.0.

## Audit summary

| Area | Result |
|------|--------|
| Feature completeness | All six structures delivered; README claims verified against code. |
| Code cleanliness | No dead code, no commented-out code, no `TODO`/`FIXME`; the only `#[allow]`s are scoped test-module allowances with justifications. |
| Error hardening | Every fallible path documented; every `Error` variant tested; no panics in shipping code. |
| API stability | Public surface reviewed; `Error` is `#[non_exhaustive]`; structs expose no constructible-by-literal internals. |
| Documentation | Every public item has rustdoc with an example; `cargo doc` is warning-free under `-D warnings`. |
| Tests | 59 unit + 8 property + 4 integration + 60 doctests, green on stable, MSRV 1.75, and Linux (WSL2). |
| Performance | Hot paths benchmarked; insert/query paths allocation-free; baselines recorded. |
| Supply chain | `cargo deny check` and `cargo audit` both pass. |

## Findings and resolutions

The structures landed in v0.5.0 in good shape; the audit surfaced only minor
hardening items, all resolved in this release:

1. **`Error` `Display` was untested.** The variants were exercised through the
   structures, but the human-readable messages had no direct coverage. Added a
   `std`-gated test module asserting the `Display` output of all three variants
   and confirming the `std::error::Error` implementation.

2. **`contains` results could be silently dropped.** A membership check whose
   result is ignored is almost certainly a bug. Marked `BloomFilter::contains`
   and `CuckooFilter::contains` `#[must_use]`. (`insert`'s novelty flag and
   `remove`'s found flag are legitimately ignorable and remain so.)

3. **`--no-default-features` builds tried to compile the examples.** The examples
   use `std` for output, so they failed to resolve without it. Declared
   `required-features = ["std"]` on each example; `cargo build`/`clippy` with
   `--no-default-features` now skip them cleanly.

4. **No supply-chain policy file.** Added `deny.toml` governing advisories,
   license allow-list, version bans (wildcards denied), and source registries.

No findings were deferred to 1.x. No panics, `unwrap`, `expect`, `todo!`, or
`dbg!` exist in shipping code (doctests and `#[cfg(test)]` modules excepted).

## API-stability review (the 1.0 surface)

The following is the public surface that 1.0 will freeze:

- Structures: `BloomFilter`, `CuckooFilter`, `CountMinSketch`, `HyperLogLog`,
  `MinHash`, `TopK`, each generic over the item type and a
  `core::hash::BuildHasher`.
- Error: `Error` (`#[non_exhaustive]`) with `InvalidParameter`,
  `IncompatibleParameters`, `CapacityExceeded`.
- Hashing: `DefaultHasher`, `DefaultHashBuilder`.
- `VERSION`, and the `prelude` module.

`Error` is `#[non_exhaustive]` so new variants can be added without a breaking
change. The structures keep all fields private, so their representations may
evolve. No public traits exist, so no sealing is required.

## Performance baseline

Latest local Criterion means (Windows x86_64, Rust stable, steady-state):

| Operation | ns/op |
|-----------|------:|
| `BloomFilter::insert` | ~6.9 |
| `BloomFilter::contains` (hit) | ~5.5 |
| `CuckooFilter::contains` (hit) | ~6.0 |
| `CountMinSketch::increment` | ~5.8 |
| `CountMinSketch::estimate` | ~6.3 |
| `HyperLogLog::insert` | ~0.9 |
| `MinHash::insert` (128 hashes) | ~24 |
| `TopK::insert` (k = 100) | ~72 |

These are the baselines 1.0 is measured against.

## Verification

```bash
cargo fmt --all -- --check
cargo clippy --all-targets --all-features -- -D warnings
cargo clippy --no-default-features --all-targets -- -D warnings
cargo clippy --no-default-features --features alloc --all-targets -- -D warnings
cargo test --all-features
cargo test --no-default-features
cargo test --no-default-features --features serde
cargo bench --bench probabilistic
cargo deny check
cargo audit
RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features
```

All green on Windows x86_64 (stable 1.95 and MSRV 1.75) and Linux (WSL2 Ubuntu).
`cargo audit` scanned 80 dependencies with no advisories; `cargo deny check`
reports `advisories ok, bans ok, licenses ok, sources ok`.

## What's next

- **v1.0.0 — Stable release.** Final API freeze, final benchmark capture, and
  the 1.0 tag. No further functional changes are planned.

## Installation

```toml
[dependencies]
bloom-lib = "0.9"
```

MSRV: Rust 1.75.

---

**Full diff:** [`v0.5.0...v0.9.0`](https://github.com/jamesgober/bloom-lib/compare/v0.5.0...v0.9.0).
**Changelog:** [`CHANGELOG.md`](https://github.com/jamesgober/bloom-lib/blob/main/CHANGELOG.md#090---2026-05-28).