Compares a Rust crate's public API between branches, detects breaking changes, and suggests the next semantic version.
cargo-breaking is a Rust command-line tool that compares a crate's public API between two different Git branches or commits. It detects breaking changes, additions, and modifications, then suggests the next semantic version (e.g., 3.0.0) based on the impact of those changes. This helps Rust developers maintain API stability and adhere to semantic versioning principles.
Rust crate maintainers and library authors who need to manage versioning and ensure backward compatibility when publishing updates.
It automates the tedious process of manually reviewing API changes for semver compliance, providing clear, actionable output that reduces human error and streamlines release workflows.
cargo-breaking is a Rust tool that analyzes changes to a crate's public API between different Git branches or commits. It identifies additions, removals, and modifications, then recommends the appropriate next version number based on semantic versioning rules. This helps maintainers ensure API compatibility and communicate changes effectively to downstream users.
cargo-breaking focuses on detecting most breaking changes while deliberately ignoring subtle, hard-to-detect ones to maintain practicality and reduce noise in versioning decisions.
Open-Awesome is built by the community, for the community. Submit a project, suggest an awesome list, or help improve the catalog on GitHub.
Provides a concise, diff-like summary of API changes with symbols for additions (+), removals (-), and modifications (≠), making it easy to visualize changes. Evidence: The README example shows output like '- user::User::from_str' and '+ user::User::from_path'.
Recommends the next semantic version (major, minor, patch) based on detected changes, helping maintainers adhere to versioning rules. Evidence: It 'suggests the next version according to semver,' as stated in the README.
Compares APIs between any Git references like branches, tags, or commits using the --against parameter, defaulting to 'main'. Evidence: Supports specifying a github ref with the -a arg for tailored comparisons.
Aids in understanding semantic versioning in Rust by highlighting breaking changes, useful for training teams on compatibility. Implied from the value proposition of reducing human error in versioning.
The project is no longer maintained, with the README advising to use cargo-semver-checks instead, posing risks for bug fixes and future compatibility. Evidence: Clear disclaimer at the top of the README.
Reports non-breaking changes like renaming arguments or generic types as breaking, which can lead to unnecessary version bumps and confusion. Evidence: README admits renaming an argument or generic type is reported as a breaking change.
Deliberately ignores subtle breaking changes such as type size changes or public trait implementations, potentially missing compatibility issues. Evidence: Goals and non-goals section lists these as ignored cases.
As it compares parts of the crate AST, it may inaccurately report changes that don't affect the public API semantically, adding noise to versioning decisions. Inferred from the false positives like adding trailing commas being reported.