cargo-sort
« Back to VersTracker
Description:
Tool to check that your Cargo.toml dependencies are sorted alphabetically
Type: Formula  |  Latest Version: 2.0.2@0  |  Tracked Since: Dec 17, 2025
Links: Homepage  |  formulae.brew.sh
Category: Developer tools
Tags: rust cargo toml formatter cli developer-tools
Install: brew install cargo-sort
About:
cargo-sort is a command-line utility designed to enforce alphabetical ordering of dependencies within Cargo.toml files. It helps maintain clean and consistent manifest files, reducing merge conflicts and improving readability. The tool can be used both as a check in CI pipelines and as an automated fixer.
Key Features:
  • Verifies alphabetical sorting of [dependencies], [dev-dependencies], and [build-dependencies]
  • Capable of automatically fixing unsorted dependencies
  • Fast execution and low resource footprint
  • Configurable via CLI flags to control strictness and scope
Use Cases:
  • Enforcing consistent dependency ordering in Rust projects
  • Integrating into CI/CD pipelines to prevent unsorted Cargo.toml files
  • Automatically cleaning up project manifests after adding new dependencies
Alternatives:
  • taplo – A general TOML formatter that handles sorting but is heavier and supports the full TOML spec
  • manual sorting – Native text editor sorting commands are faster but prone to human error and inconsistency
License: Apache-2.0 OR MIT
Bottles available for: arm64_tahoe, arm64_sequoia, arm64_sonoma, arm64_ventura, sonoma, ventura, arm64_linux, x86_64_linux
Version History
Detected Version Rev Change Commit
Sep 12, 2025 5:40pm 0 VERSION_BUMP 7bf89b26