composer_wire/lib.rs
1//! The Composer v2 repository **wire format** — the metadata documents a
2//! Composer 2 client and a Composer repository exchange.
3//!
4//! - [`PackageDocument`] / [`RootManifest`] — the `p2/*.json` and root
5//! `packages.json` document types (the [`document`] module).
6//! - [`expand_versions`] / [`minify_versions`] — the `composer/2.0`
7//! minified-metadata algorithm and its exact inverse (the [`minify`]
8//! module).
9//!
10//! A client parses and *expands* upstream metadata; a server builds and
11//! *minifies* metadata to serve. Sharing one implementation means the
12//! producer and consumer of the wire format can't drift:
13//! `expand_versions(minify_versions(v)) == v`.
14//!
15//! Part of the `composer-rs` workspace; extracted from bougie's
16//! `bougie-composer`.
17
18pub mod document;
19pub mod minify;
20
21pub use document::{PackageDocument, RootManifest};
22pub use minify::{MINIFIED_MARKER, UNSET, expand_versions, minify_versions};