rust-semverver  by rust-lang

CLI tool for Rust library crate semantic versioning checks

created 8 years ago
635 stars

Top 53.2% on sourcepulse

GitHubView on GitHub
1 Expert Loves This Project
Project Summary

This project provides a tool for automatically checking semantic versioning compliance in Rust library crates. It is intended for Rust developers and maintainers to ensure backward compatibility and prevent breaking changes in their published libraries.

How It Works

The tool compiles both the old and new versions of a Rust crate into rlibs. These are then linked as dependencies to an empty dummy crate. A custom compiler driver analyzes this setup, leveraging type information and compiler resources to identify semantic versioning violations according to the Rust API evolution RFC.

Quick Start & Requirements

  • Install using cargo install --git https://github.com/rust-lang/rust-semverver.
  • Requires a specific nightly Rust toolchain (e.g., nightly-2022-08-03). Install with rustup install nightly-2022-08-03 and add components: rustup component add rustc-dev llvm-tools-preview --toolchain nightly-2022-08-03.
  • cmake and common system libraries may be needed.
  • Usage: cargo semver within a project directory.
  • More details: https://github.com/rust-lang/rust-semverver

Highlighted Details

  • Compares local crate versions against published versions on crates.io.
  • Supports comparing arbitrary crate versions via filesystem paths or name:version strings.
  • Offers JSON output for machine-readable analysis of changes.
  • Classifies changes into categories like Patch, NonBreaking, TechnicallyBreaking, and Breaking.

Maintenance & Community

This project is deprecated. Alternatives include cargo-semver-checks and cargo-public-api.

Licensing & Compatibility

  • License: 3-clause BSD license.
  • Compatible with commercial use and closed-source linking.

Limitations & Caveats

The project is deprecated, and its type checking may have edge-case inaccuracies. The README notes that a long-term goal was to fix these in the compiler, but the project's deprecated status suggests this may not have been fully realized.

Health Check
Last commit

2 years ago

Responsiveness

1 day

Pull Requests (30d)
0
Issues (30d)
0
Star History
1 stars in the last 90 days

Explore Similar Projects

Starred by Chip Huyen Chip Huyen(Author of AI Engineering, Designing Machine Learning Systems), Shawn Wang Shawn Wang(Editor of Latent Space), and
8 more.

llm by rustformers

0%
6k
Rust ecosystem for LLM Rust inference (unmaintained)
created 2 years ago
updated 1 year ago
Feedback? Help us improve.