# `cargo public-api` baselines F41 — public-api baseline established 2026-05-06. One file per workspace crate; each is the verbatim output of `cargo +nightly public-api --simplified -p `. ## Why a baseline `mxaccess` and friends are heading for `cargo publish`. Once the crates are on crates.io, semver-breaking changes to the public surface need to be intentional. The baseline is what CI diffs against to catch unintentional drift. ## Update procedure When a PR intentionally changes the public API: 1. Build the crate against nightly + `cargo-public-api`: ```powershell rustup toolchain install nightly # one-time cargo install cargo-public-api # one-time ``` 2. Regenerate the affected baseline file: ```powershell cd rust cargo +nightly public-api --simplified -p > ../design/public-api/.txt ``` 3. Commit the regenerated file alongside the API change. Reviewers inspect the diff at `design/public-api/.txt` to verify the intent matches the wire-up. ## CI `.github/workflows/rust.yml` runs `cargo +nightly public-api --simplified -p ` for each workspace crate after the standard build/test/clippy/fmt matrix and `diff`s the live output against the committed baseline. Drift fails the CI step; the PR author either adjusts the implementation or updates the baseline (per the procedure above). ## What `--simplified` strips `--simplified` (single `-s`) omits blanket impls (e.g. `impl Clone for Vec`-style noise) but keeps everything that's reachable through the crate's named public items. Doubling (`-ss`) would also strip auto-trait impls (`Send`, `Sync`, `UnwindSafe`); we don't because intentional `Send` / `Sync` losses on a `Session` clone *are* a semver break we want to catch. ## Per-crate sizes (line counts) Captured at baseline date: | crate | lines | |----------------------|------:| | `mxaccess-codec` | ~2516 | | `mxaccess-asb` | ~1258 | | `mxaccess-rpc` | ~1273 | | `mxaccess-asb-nettcp`| ~708 | | `mxaccess` | ~542 | | `mxaccess-galaxy` | ~374 | | `mxaccess-callback` | ~170 | | `mxaccess-compat` | ~123 | | `mxaccess-nmx` | ~118 |