cargo-fmt-toml-0.0.8 is not a library.
cargo-fmt-toml
Cargo subcommand to format and normalize Cargo.toml files according
to workspace standards.
Installation
Using cargo-binstall (Recommended)
The fastest way to install pre-built binaries:
Using cargo install
Build from source (slower, requires Rust toolchain):
Features
- Workspace Dependencies: Ensures all dependency versions are managed at workspace level
- Internal Dependencies: All workspace crates use
{ workspace = true }for consistency - Sorted Dependencies: All dependency sections are sorted alphabetically by name
- Package Section Format: Enforces a consistent
[package]section format
Usage
# Format all Cargo.toml files in the workspace
# Preview changes without modifying files
# Check if files need formatting (returns non-zero if changes
# needed)
Package Section Format
The tool enforces this exact format for the [package] section:
[]
= "crate-name"
= "Brief description"
= { = true }
= { = true }
= { = true }
= { = true }
= { = true }
= { = true }
Dependency Sorting
All dependency sections are sorted alphabetically:
[dependencies][dev-dependencies][build-dependencies][target.'cfg(...)'.dependencies]
Integration
Add to your Makefile:
: :
: :