Skip to content

RustSandbox/rust-workflow-bundles

Repository files navigation

πŸ¦€ Rust Workflow Bundles

Stop typing the same cargo commands over and over. Use powerful workflow bundles instead.

Bundle multiple cargo commands and extensions into single, easy-to-use aliases. Save 2-3 hours per week.

License: MIT Rust Shell


✨ Features

  • πŸš€ 40+ bundled workflows - One command runs multiple cargo operations
  • ⚑ Save 2-3 hours/week - Stop typing repetitive commands
  • πŸ”’ Security-first - Built-in security auditing bundles
  • πŸ§ͺ Testing workflows - Complete test suites in one command
  • πŸ“¦ Dependency management - Health checks and auto-fixes
  • 🎯 CI/CD simulation - Test locally before pushing
  • πŸ› οΈ Fully customizable - Add your own workflow bundles
  • πŸ“š Well documented - Comprehensive guides and examples

πŸ“¦ Quick Start

Installation (30 seconds)

# Clone the repository
git clone https://github.com/RustSandbox/rust-workflow-bundles.git
cd rust-workflow-bundles

# Run the install script
./install.sh

# Or manually source it
source rust-bundles.sh
echo "source $(pwd)/rust-bundles.sh" >> ~/.zshrc

First Command

# Run a complete development cycle
cdev

That's it! πŸŽ‰


πŸš€ Usage

The Essential Five

cdev        # Format + Clippy + Test + Build
cpre        # Pre-commit checks
cci         # Full CI simulation
cfixall     # Auto-fix everything
chealth     # Project health dashboard

Daily Workflow

# Morning
chealth

# During development (auto-run tests on file changes)
cwatchdev

# Before committing
cpre

# Before pushing
cci

# Friday afternoon
cmaintenance

Common Patterns

# Fix and commit
cfixall && cpre && git commit -m "fix: issues"

# Before pushing
cci

# Before creating PR
cfixall && cpr

# Before release
cprelease && crelease patch

# Emergency fix
cnuclear && cpre

# Weekly maintenance
cmaintenance

πŸ“š Documentation


🎯 Command Categories

Development

  • cdev - Complete development cycle
  • cdevfast - Quick check + test
  • cwatchdev - Watch mode (auto-run tests)

Quality Gates

  • cpre - Pre-commit checks
  • cstrict - Strict quality checks
  • cquality - Complete quality gate (10+ checks)

Security

  • csecaudit - Full security audit
  • csecquick - Quick security check

Dependencies

  • cdephealth - Complete dependency check
  • cdepfix - Auto-fix dependency issues
  • cdeprefresh - Clean + update + rebuild

Testing

  • ctestall - Run all test types
  • ctestcov - Tests with coverage report
  • ctestfeatures - Test all feature combinations

Performance

  • cperfcheck - Full performance analysis
  • cperfquick - Quick performance check
  • cbuildopt - Optimized build with analysis

CI/CD

  • cci - Simulate CI pipeline
  • ccifull - Full CI with security
  • ccifast - Quick CI feedback

Release

  • cprelease - Pre-release checklist
  • crelease - Create release (patch/minor/major)

Fix & Maintenance

  • cfixall - Auto-fix everything
  • cnuclear - Nuclear option (fix ALL)
  • cmaintenance - Full weekly maintenance
  • chealth - Project health dashboard

See full command list β†’


πŸ› οΈ Requirements

Required

  • Rust toolchain (rustup, cargo)
  • Bash or Zsh shell

Recommended Tools

# Install cargo-binstall first (much faster)
cargo install cargo-binstall

# Essential tools
cargo binstall -y \
  cargo-nextest \
  cargo-audit \
  cargo-geiger \
  cargo-machete \
  cargo-deny \
  cargo-outdated \
  watchexec-cli

Complete installation guide β†’


πŸ“Š Time Saved

Workflow Manual Time Bundle Time Saved
Pre-commit 2 minutes 30 seconds 1.5 min
CI check 5 minutes 2 minutes 3 min
Security audit 3 minutes 1 minute 2 min
Quality gate 15 minutes 5 minutes 10 min

Average savings: 2-3 hours per week ⏰


🎨 Customization

Add your own workflow bundles:

# Add to ~/.zshrc after sourcing rust-bundles.sh

# Custom workflow
cmyflow() {
  echo "πŸ”§ My Workflow" &&
  cargo fmt &&
  cargo clippy -- -D warnings &&
  cargo test &&
  echo "βœ… Done!"
}

# Database reset workflow
cdbr() {
  cargo run --bin migrate reset &&
  cargo run --bin migrate up &&
  cargo run --bin seed
}

More examples β†’


πŸ“– Examples

Example 1: Morning Development

cd ~/my-rust-project
chealth              # Check project status
cwatchdev            # Start watch mode
# Code away...
cpre                 # Before committing
git commit -m "feat: new feature"

Example 2: Before Pushing

cfixall              # Auto-fix issues
cci                  # Run CI simulation
git push             # Push with confidence

Example 3: Release Workflow

cprelease            # Run pre-release checks
crelease patch       # Create patch release
cargo publish        # Publish to crates.io

More examples β†’


🀝 Contributing

Contributions are welcome! See CONTRIBUTING.md for details.

Quick Contribution Guide

  1. Fork the repository
  2. Create your feature branch (git checkout -b feature/amazing-bundle)
  3. Add your workflow bundle to rust-bundles.sh
  4. Update documentation
  5. Test thoroughly
  6. Commit your changes (git commit -m 'Add amazing bundle')
  7. Push to the branch (git push origin feature/amazing-bundle)
  8. Open a Pull Request

πŸ“ License

This project is licensed under the MIT License - see the LICENSE file for details.


πŸ™ Acknowledgments

Inspiration

This project was inspired by:

Built With

Amazing Rust tooling that powers these workflows:


⭐ Show Your Support

If this project helped you, please consider:

  • ⭐ Starring the repository
  • πŸ› Reporting bugs
  • πŸ’‘ Suggesting new workflow bundles
  • πŸ“ Improving documentation
  • πŸ”€ Submitting pull requests

πŸ“ž Support & Community


πŸ—ΊοΈ Roadmap

  • Add support for cargo workspaces
  • Integration with popular CI/CD platforms
  • Web dashboard for project health
  • VS Code extension
  • Plugin system for custom extensions
  • Telemetry and analytics (opt-in)

πŸ“ˆ Project Stats

  • Commands: 40+ bundled workflows
  • Time Saved: 2-3 hours/week average
  • Rust Version: 1.70+
  • Shell Support: Bash 4+, Zsh 5+

πŸ”— Related Projects


πŸ’‘ FAQ

Q: Do I need all the recommended tools? A: No! Bundles will gracefully fallback if tools are missing.

Q: Can I use this with existing projects? A: Yes! Works with any Rust project immediately.

Q: How do I update? A: Run git pull in the repository directory.

Q: Can I customize the bundles? A: Absolutely! Add your own in ~/.zshrc or modify rust-bundles.sh.

Q: Does this work on Windows? A: Best on Linux/macOS. Windows users should use WSL2.


πŸ“œ Changelog

See CHANGELOG.md for release history.


Made with ❀️ for the Rust community

⬆ Back to top

About

Bundle multiple cargo commands and extensions into single, easy-to-use aliases.

Topics

Resources

License

Contributing

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages