cargo-c-build-0.9.3 is not a library.
📦 cargo-c-build
AI-assisted Git commit automation during Rust builds
cargo-c-build is a custom Cargo tool that enhances your development workflow by automatically committing your changes with AI-generated commit messages every time you build your Rust project. This creates a detailed, rollback-friendly version history, especially useful when working in AI-driven or experimental environments.
🔍 What It Does
- Checks your Git working directory for modified files.
- If changes are found:
- Uses
git diffto generate a context summary. - Sends that summary to an OpenAI model to generate a meaningful commit message.
- Builds your project using
cargo build. - If the build succeeds:
- Stages all modified files.
- Commits the changes with the generated message.
- Uses
- If the build fails, nothing is committed.
- Supports flag pass through such as: -release, --features, or -vv.
🧠 Why Use This?
With more tools (and even developers) relying on AI to generate or modify code, it's easy to lose track of changes. This crate provides:
- ✅ Automatic version control checkpoints
- ✅ Detailed, AI-generated commit messages
- ✅ Safe rollback options when changes go wrong
- ✅ Zero manual Git work during development
- ✅ Auditability for AI-generated modifications
🗺️ Roadmap
Building toward smarter and more flexible automation, here’s what’s on the horizon for cargo‑c‑build:
- Support more model provider options instead of just OpenAi.
- Support nightly toolchain.
⚙️ Installation
📦 Crates.io
# Step 1: Download the Crate
# Step 2/3: Locate Package or Working Directory and Create .env with the below inside of it.
)
# Step 4: Run the custom build tool
# Step 5: Have Fun!
📦 Local Install
# Step 1: Build the crate
# Step 2: Install it locally
# Step 3: Locate Package or Working Directory and Create .env with the below inside of it.
)
# Step 4: Run the custom build tool
# Step 5: Have Fun!