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 v1.0.0 — Stable

**The API is frozen.** v1.0.0 is the first stable release of `bloom-lib`. It
contains no functional changes since v0.9.0 — the pre-1.0 audit found no
blockers — and exists to commit to the public surface under Semantic Versioning.
From here, no breaking change ships without a major version bump.

## What is bloom-lib?

A collection of probabilistic data structures for Rust — compact summaries that
answer membership, cardinality, frequency, and similarity questions with
bounded, tunable error in a fraction of the memory an exact structure would
need. Allocation-free insertions, serializable state, mergeable structures, and
a pluggable hash function. `no_std`-friendly with no required runtime
dependency beyond `libm`.

## The 1.0 surface

Six structures, each generic over the item type and a `core::hash::BuildHasher`:

| Structure | Answers | Deletion | Mergeable |
|-----------|---------|----------|-----------|
| `BloomFilter` | Is this item in the set? || yes |
| `CuckooFilter` | Is this item in the set? | yes ||
| `CountMinSketch` | How often have I seen this item? || yes |
| `HyperLogLog` | How many distinct items are there? || yes |
| `MinHash` | How similar are two sets? || yes |
| `TopK` | What are the most frequent items? |||

Plus the supporting surface: `Error` (`#[non_exhaustive]`), `DefaultHasher`,
`DefaultHashBuilder`, `VERSION`, and the `prelude`.

## Stability guarantee

1.0.0 follows [SemVer](https://semver.org/) strictly. The frozen surface and the
precise list of what is *not* covered (sizing-math byte layout, exact hash
values, last-digit estimation results) are documented in
[`docs/API.md#compatibility`](https://github.com/jamesgober/bloom-lib/blob/main/docs/API.md#compatibility).
`Error` is `#[non_exhaustive]`, so new variants can be added without breaking
downstream `match`es that carry a wildcard arm. The structures keep their fields
private, so internal representations remain free to evolve. MSRV is Rust 1.75;
raising it is a minor-version change.

## Performance

Final Criterion baselines (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 |

The insert/query hot paths are allocation-free and use only integer arithmetic;
floating-point math runs only at construction, via `libm`, for bit-identical
geometry across platforms.

## Quality gates

All green on Windows x86_64 (stable 1.95 and MSRV 1.75) and Linux (WSL2 Ubuntu):

- `cargo fmt --all -- --check`
- `cargo clippy --all-targets --all-features -- -D warnings` (and
  `--no-default-features`, `--features alloc`)
- `cargo test --all-features` — 59 unit + 8 property + 4 integration + 60
  doctests
- `cargo bench --bench probabilistic`
- `cargo deny check` — advisories / bans / licenses / sources ok
- `cargo audit` — 80 dependencies, no advisories
- `RUSTDOCFLAGS="-D warnings" cargo doc --no-deps --all-features`

No `unwrap`, `expect`, `panic!`, `todo!`, or `dbg!` exist in shipping code.

## Breaking changes

None. v1.0.0 is byte-for-byte equivalent to v0.9.0 in behaviour; only the version
number and the stability documentation changed.

## Installation

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

# With serialization:
bloom-lib = { version = "1.0", features = ["serde"] }

# Heap-capable no_std:
bloom-lib = { version = "1.0", default-features = false, features = ["alloc"] }
```

MSRV: Rust 1.75.

## Documentation

- [README]https://github.com/jamesgober/bloom-lib/blob/main/README.md
- [API Reference]https://github.com/jamesgober/bloom-lib/blob/main/docs/API.md
- [CHANGELOG]https://github.com/jamesgober/bloom-lib/blob/main/CHANGELOG.md

---

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