Skip to content

Conversation

@MikeMcQuaid
Copy link
Member

@MikeMcQuaid MikeMcQuaid commented Dec 15, 2025

Similar to the Go support, this adds support for Rust's Cargo packages to brew bundle.

Fixes #21194

@MikeMcQuaid MikeMcQuaid force-pushed the brew_bundle_cargo branch 2 times, most recently from c79b83d to 9a2c62b Compare December 16, 2025 09:54
@MikeMcQuaid MikeMcQuaid marked this pull request as ready for review December 17, 2025 08:40
Copilot AI review requested due to automatic review settings December 17, 2025 08:40
@MikeMcQuaid MikeMcQuaid added this pull request to the merge queue Dec 17, 2025
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request adds support for Rust's Cargo package manager to brew bundle, enabling users to declare and manage Cargo packages in their Brewfiles. The implementation follows the existing pattern established by Go package support, providing feature parity for listing, dumping, installing, and checking Cargo packages.

Key Changes:

  • Added cargo DSL method to Brewfile syntax for declaring Cargo packages
  • Implemented installer, dumper, and checker modules for Cargo packages that automatically install Rust when needed
  • Extended all brew bundle subcommands (dump, list, install, add, remove) to support Cargo packages with corresponding --cargo and --no-cargo flags

Reviewed changes

Copilot reviewed 24 out of 25 changed files in this pull request and generated no comments.

Show a summary per file
File Description
manpages/brew.1 Updated manpage to document Cargo support in bundle description and new --cargo/--no-cargo flags
docs/Manpage.md Updated documentation to describe Cargo package support and associated flags
docs/Brew-Bundle-and-Brewfile.md Added Cargo example to Brewfile types documentation showing ripgrep installation
completions/zsh/_brew Added --cargo and --no-cargo completions with proper mutual exclusions
completions/fish/brew.fish Added --cargo and --no-cargo flag completions for Fish shell
completions/bash/brew Added --cargo and --no-cargo flag completions for Bash shell
Library/Homebrew/cmd/bundle.rb Added --cargo and --no-cargo switches, integrated Cargo into all bundle subcommands
Library/Homebrew/bundle.rb Added which_cargo and cargo_installed? helper methods to main Bundle module
Library/Homebrew/bundle/cargo_installer.rb New installer module that installs Rust if needed and manages Cargo package installations
Library/Homebrew/bundle/cargo_dumper.rb New dumper module that lists installed Cargo packages from cargo install --list
Library/Homebrew/bundle/cargo_checker.rb New checker module to verify Cargo package installation status
Library/Homebrew/bundle/dsl.rb Added cargo() DSL method for Brewfile syntax
Library/Homebrew/bundle/lister.rb Extended to support listing Cargo entries from Brewfiles
Library/Homebrew/bundle/installer.rb Integrated CargoInstaller into package installation flow
Library/Homebrew/bundle/dumper.rb Integrated CargoDumper into Brewfile generation
Library/Homebrew/bundle/checker.rb Added cargo_packages_to_install check method
Library/Homebrew/bundle/commands/*.rb Updated dump and list commands to accept cargo parameter
Library/Homebrew/sorbet/rbi/dsl/homebrew/cmd/bundle.rbi Auto-generated Sorbet signatures for new cargo? and no_cargo? methods
Library/Homebrew/test/bundle/*_spec.rb Comprehensive test coverage for all Cargo functionality including installer, dumper, checker, DSL, and command integration
Files not reviewed (1)
  • Library/Homebrew/sorbet/rbi/dsl/homebrew/cmd/bundle.rbi: Language not supported

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Merged via the queue into main with commit 2bf3eaf Dec 17, 2025
44 checks passed
@MikeMcQuaid MikeMcQuaid deleted the brew_bundle_cargo branch December 17, 2025 09:02
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.

Add support for installing cargo packages in Brewfile

3 participants