rationalize-deps

Identify Cargo.toml dependencies with unnecessary default features and verify minimal feature sets.

15.7k|958|Updated Jan 11, 2016
One-click install
npx skills add https://github.com/quickwit-oss/tantivy --skill rationalize-deps
Or copy as Structured Prompt for Agent
Please help me install this Agent Skill.
Skill: rationalize-deps
Source: https://github.com/quickwit-oss/tantivy/tree/main/.claude/skills/rationalize-deps
Command: npx skills add https://github.com/quickwit-oss/tantivy --skill rationalize-deps

SYSTEM DOCUMENTATION & REQUIREMENTS

What problem does it solve?

Reduces compile times and binary size by identifying Cargo.toml dependencies that enable default features and removing unused ones.

Core Features & Use Cases

  • Detect dependencies with default features enabled that are not required by the codebase.
  • Propose minimal feature sets per dependency and verify changes by compiling the workspace.
  • Suitable for Rust workspaces with many crates to streamline builds and distribution sizes.

Quick Start

Run the analysis on your workspace to prune default features and verify builds.

Frequently Asked Questions about rationalize-deps

High-intent search queries and answers about installing and using this skill.

FAQPage Schema
How do I reduce Rust compile times by trimming Cargo features?

Identify dependencies with default features enabled in your workspace Cargo.toml, disable unnecessary ones, and iteratively build the workspace to verify the minimal feature set for reduced compile times and binary size.

What are unnecessary default features in a Rust workspace and how are they detected?

Unnecessary default features in a Rust workspace are Cargo dependency flags enabled by default but not required by the codebase. They are detected by examining documented crate features and attempting to disable default-features during build verification.

How do I disable default-features in Cargo.toml and verify the build?

Set default-features = false for candidate dependencies in Cargo.toml, run cargo check to test compilation, and iterate the build verification until the minimal required feature set is achieved.

Can I optimize Cargo build-optimization for a large Rust workspace with many crates?

Yes, you can optimize build-optimization for a large Rust workspace by assessing each crate's documented features, pruning default features that are unused, and validating the minimal set through workspace compilation.

What is the best way to prune unused Cargo dependencies to reduce binary size?

Systematically disable default features per dependency in your workspace, verify the build compiles successfully, and generate a reproducible report of the validated minimal feature configurations to effectively reduce binary size.