devenv: Add data-driven cargo tool installation#166
Merged
henrywang merged 1 commit intobootc-dev:mainfrom Apr 23, 2026
Merged
Conversation
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>
There was a problem hiding this comment.
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.
henrywang
approved these changes
Apr 23, 2026
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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)