Skip to content

chore: do not build bin-specific dependencies in lib#7

Open
ThomasRubini wants to merge 2 commits into
mainfrom
deps
Open

chore: do not build bin-specific dependencies in lib#7
ThomasRubini wants to merge 2 commits into
mainfrom
deps

Conversation

@ThomasRubini
Copy link
Copy Markdown

@ThomasRubini ThomasRubini commented Mar 17, 2026

Description

This PR removes bin-specific dependencies from the library, allowing the library to be built without compiling e.g. clap-rs

How Has This Been Tested?

  • cargo tree does not list bin-specific deps, while cargo tree -F cli does

Checklist:

  • My code follows the style guidelines of this project
  • I have performed a self-review of my code
  • I have commented my code, particularly in hard-to-understand areas
  • I have made corresponding changes to the documentation
  • My changes generate no new warnings
  • I have added tests that prove my fix is effective or that my feature works
  • New and existing unit tests pass locally with my changes
  • Any dependent changes have been merged and published in downstream modules

Summary by CodeRabbit

  • Refactor
    • CLI is now an optional component; users must install with the CLI feature flag to use the command-line interface.
    • Updated installation instructions to reflect the new setup requirements for CLI access.

@coderabbitai
Copy link
Copy Markdown

coderabbitai Bot commented Mar 17, 2026

📝 Walkthrough

Walkthrough

The pull request makes the CLI components optional by converting clap to an optional dependency, introducing new optional UI dependencies (ratatui, crossterm, indicatif), and establishing a new cli feature that bundles these together. The binary is configured to require this feature, ensuring proper compilation with the feature flag.

Changes

Cohort / File(s) Summary
Dependency Management
Cargo.toml
Made clap optional; added optional dependencies ratatui, crossterm, indicatif; defined cli feature combining all CLI dependencies; marked binary with required-features = ["cli"].
Documentation
README.md
Renamed Installation section to CLI Installation and updated the install command to include -F cli feature flag for the binary.

Estimated code review effort

🎯 2 (Simple) | ⏱️ ~10 minutes

Poem

🐰 With whiskers twitched and feature flags in place,
The CLI now dances to an optional pace,
No more mandatory clap, just when you need,
Clean dependencies bloom from the feature seed! 🌱

🚥 Pre-merge checks | ✅ 3
✅ Passed checks (3 passed)
Check name Status Explanation
Title check ✅ Passed The title clearly and concisely summarizes the main change: making binary-specific dependencies optional rather than mandatory for library builds.
Docstring Coverage ✅ Passed No functions found in the changed files to evaluate docstring coverage. Skipping docstring coverage check.
Description check ✅ Passed The pull request description covers the main objective, testing approach, and includes a completed checklist addressing documentation updates and test passing.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.

✨ Finishing Touches
  • 📝 Generate docstrings (stacked PR)
  • 📝 Generate docstrings (commit on current branch)
🧪 Generate unit tests (beta)
  • Create PR with unit tests
  • Commit unit tests in branch deps
📝 Coding Plan
  • Generate coding plan for human review comments

Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out.

❤️ Share

Comment @coderabbitai help to get the list of available commands and usage tips.

@ThomasRubini
Copy link
Copy Markdown
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant