cargo-tops 0.1.1

init / check / gate for the Rust-TOPS protocol. Orchestrates existing Cargo tools; does not replace them.
cargo-tops-0.1.1 is not a library.

Rust-TOPS

Rust Testing and Optimization Protocol Suite.

A machine-readable protocol for shipping Rust that is correct, dense, and fast. This repository is the public kit: spec, schema, drop-in gates, agent harness, class profiles, and a thin cargo-tops orchestrator. It is a template and a policy suite — not a product crate's CI history.

Plane Number Lives in
Protocol 1.0.0 RUST_TOPS.md, schema/
Package / git tag 0.1.1 Cargo workspace, tag v0.1.1, crates.io cargo-tops

Files

Path What
RUST_TOPS.md Normative specification (protocol 1.0.0)
schema/rust-tops.schema.json JSON Schema (draft 2020-12) for instances
POLICIES.md Harvested gates / checks (practice layer)
config/rust-tops.example.yaml Filled instance for a parser-codec crate
config/rust-tops.lock.example Tool-version lock template
AGENTS.md Light harness for coding agents
BEND2-INTEGRATION.md Bend2 encode track — candidates, not protocol 1.0
config/drop-in/ clippy.toml, nextest, mutants, crap, deny, GHA floor
profiles/ Class overlays (library-core, parser-codec, …)
crates/cargo-tops init / check / gate — orchestrates existing tools
examples/ Tiny fixtures (parser-codec, no-std-embedded)

Adopt in a crate

cp config/rust-tops.example.yaml        ./rust-tops.yaml
cp config/rust-tops.lock.example        ./rust-tops.lock
cp AGENTS.md                            ./AGENTS.md
cp config/drop-in/clippy.toml           ./clippy.toml
cp config/drop-in/nextest.toml          ./.config/nextest.toml
cp config/drop-in/mutants.toml          ./.cargo/mutants.toml
cp config/drop-in/cargo-crap.toml       ./.cargo-crap.toml
cp config/drop-in/deny.toml             ./deny.toml
cp config/drop-in/rust-tops.yml         ./.github/workflows/rust-tops.yml

Or:

cargo install cargo-tops
cargo tops init --class parser-codec

Then edit {TOKENS} in the workflow (sysdeps, MSRV, primary package, feature cells). Edit crate.class, hot_paths, coverage floors, and exemptions in rust-tops.yaml.

The drop-in workflow is a floor, not a ceiling. See POLICIES.md.

One-line intent

Production: fewest necessary lines. Tests: as strong as the contract. Gates: lint → nextest → coverage → CRAP → mutants-on-diff → properties / fuzz / Miri / Kani as the crate class demands. Never split a function only to please CRAP. Never write tests from the impl.

Validate an instance

# any draft-2020-12 validator, e.g.
npx --yes ajv-cli@5 compile -s schema/rust-tops.schema.json
cargo tops check

License

MIT OR Apache-2.0. See LICENSE.