Mxr Extracted Crates

Mxr extracted crates

The small public Rust crates that came out of Mxr. They are not the mxr product; they are bounded email contracts that were worth making reusable.

The current shipped set:

Crate Contract Why it exists outside mxr
mail-query Gmail-style search parser and typed AST Other mail tools need the syntax without inheriting mxr's store/search engine.
mail-threading JWZ / RFC 5256 client-side email threading Thread reconstruction is subtle enough to deserve a conformance corpus.
list-unsubscribe RFC 2369 / RFC 8058 unsubscribe header parsing One-click unsubscribe combines several specs and provider policy quirks.
mailbox-formats mbox variants and Maildir reader/writer Local mail storage formats are small but full of compatibility edge cases.

What this taught

Extraction is product work, not file moving.

A publishable crate needs a contract, independent docs, conformance data, versioning discipline, and a clean path back into the source product. The useful artifact is not "code mxr happens to use"; it is "behavior another project can trust without adopting mxr."

The strongest rule from this wave: do not publish a crate just because the code
is easy to separate. Publish only when the maintenance promise is justified by a
real ecosystem gap and a non-trivial contract.

The newer documentation rule: do not make that gap sound timeless in a public
README. Ecosystem analysis should be framed as a dated review result. The
README should lead with the package contract, not with an opponent-shaped
claim. See Durable Docs Avoid Opponent-Shaped Claims.

Current code truth

mxr consumes these from crates.io through the root Cargo.toml:

cargo tree -p mxr-search -i mail-query
cargo tree -p mxr-sync -i mail-threading
cargo tree -p mxr-mail-parse -i list-unsubscribe
cargo tree -p mxr-export -i mailbox-formats

Validated 2026-06-04: mxr still depends on 0.1.0 for all four extracted
crates.

Latest crates.io releases on that same check:

Crate mxr consumes crates.io latest
mail-query 0.1.0 0.1.2
mail-threading 0.1.0 0.1.3
list-unsubscribe 0.1.0 0.1.2
mailbox-formats 0.1.0 0.1.3

Those are different truth surfaces. Patch releases can improve README copy,
crate metadata, or docs.rs output without changing what mxr builds against.
See Version Truth Has Surfaces.

General lesson

An extracted library should be smaller than the app, but more precise than the app. The app can make product policy choices. The library should expose the stable contract and make policy explicit enough that other products can choose differently.

See also