Skip to content

devenv: Add data-driven cargo tool installation#166

Merged
henrywang merged 1 commit intobootc-dev:mainfrom
cgwalters:cargo-tools
Apr 23, 2026
Merged

devenv: Add data-driven cargo tool installation#166
henrywang merged 1 commit intobootc-dev:mainfrom
cgwalters:cargo-tools

Conversation

@cgwalters
Copy link
Copy Markdown
Contributor

Add cargo-tools.txt and install-cargo-tools.sh, mirroring the existing tool-versions.txt / fetch-tools.py pattern for pre-built binaries. Adding a new cargo-installable tool is now a one-line addition to cargo-tools.txt with a Renovate annotation — no per-tool install scripts or Containerfile ARGs needed.

Initial tools: cargo-vendor-filterer 0.5.18, cargo-edit 0.13.9.

Kani stays as a dedicated install script since it has special requirements (gcc, cargo-kani setup, KANI_HOME directory).

Assisted-by: OpenCode (Claude Opus 4)

I want to use our devcontainer in GHA to e.g. automate releases,
and we need `cargo-vendor-filterer` for that.

Add cargo-tools.txt and install-cargo-tools.sh, mirroring the existing
tool-versions.txt / fetch-tools.py pattern for pre-built binaries. Adding
a new cargo-installable tool is now a one-line addition to cargo-tools.txt
with a Renovate annotation — no per-tool install scripts or Containerfile
ARGs needed.

Initial tools: cargo-vendor-filterer 0.5.18, cargo-edit 0.13.9.

Kani stays as a dedicated install script since it has special requirements
(gcc, cargo-kani setup, KANI_HOME directory).

Assisted-by: OpenCode (Claude Opus 4)
Signed-off-by: Colin Walters <walters@verbum.org>
Copy link
Copy Markdown

@gemini-code-assist gemini-code-assist Bot left a comment

Choose a reason for hiding this comment

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

Code Review

This pull request introduces a unified mechanism for installing cargo tools across CentOS, Debian, and Ubuntu container environments by adding a cargo-tools.txt configuration file and an install-cargo-tools.py script. The review feedback suggests several improvements to the Python script, including moving imports to the top level for PEP 8 compliance, enhancing input validation for crate names, using shutil.move to ensure cross-filesystem compatibility, and adopting security best practices when invoking cargo install via subprocess.

Comment thread devenv/install-cargo-tools.py
Comment thread devenv/install-cargo-tools.py
Comment thread devenv/install-cargo-tools.py
Comment thread devenv/install-cargo-tools.py
Comment thread devenv/install-cargo-tools.py
@cgwalters cgwalters requested a review from jmarrero April 16, 2026 15:46
@henrywang henrywang merged commit 4e87713 into bootc-dev:main Apr 23, 2026
20 of 21 checks passed
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.

2 participants