The Type-Safe Rust Development Standards Enforcer
"Like a blacksmith forges iron into steel, Ferrous Forge shapes your Rust code into perfection."
Ferrous Forge is a system-wide Rust development standards enforcer that automatically applies professional-grade coding standards to your Rust projects. It integrates with cargo commands, installs git hooks for pre-commit and pre-push validation, and provides a CLI for managing Rust versions, editions, safety checks, and more.
Version: 1.7.2 | MSRV: 1.88 (Edition 2024) | License: MIT OR Apache-2.0
- Version Checking β Check your Rust installation against latest GitHub releases
- Update Recommendations β Intelligent update suggestions (security/major/minor)
- Release Tracking β List recent Rust releases with dates and release notes
- Compliance Checking β Verify your project uses the latest Rust edition
- Migration Assistant β Guided migration from older editions to Edition 2024
- Compatibility Analysis β Pre-migration compatibility checking
- Automated Fixes β Integration with
cargo fix --edition
- Pre-Commit Protection β Block commits that would fail CI
- Pre-Push Validation β Comprehensive checks before pushing to remote
- Publish Safety β Prevent broken crates from reaching crates.io
- Emergency Bypass β Hotfix capability with audit logging
- π« Zero Underscore Bandaid β Eliminates
_parameterlazy patterns - π Edition 2024 Enforcement β Enforces latest Rust edition
- π― Comprehensive Clippy β Enforces
clippy::all,clippy::pedantic, andclippy::nurserylint groups, plus specific denies forunwrap_usedandexpect_used - π Size Limits β Default limits of 300-line files and 50-line functions (configurable)
- π Documentation Coverage β Enforces RustDoc for public APIs with configurable thresholds
- π§ System-Wide Integration β Intercepts
cargoandrustccommands viaferrous-forge init - π― Zero Configuration β Works immediately after installation
- π Auto-Updates β Keeps standards current with the Rust ecosystem
- π§ͺ Testing Enforced β Requires comprehensive test coverage
- π‘οΈ Security First β Automatic vulnerability scanning via
cargo audit
# Install from crates.io
cargo install ferrous-forge
# Initialize system-wide standards (one-time setup)
ferrous-forge init
# Check your Rust version and get update recommendations
ferrous-forge rust check
# Check if your project uses the latest edition
ferrous-forge edition check
# That's it! All your Rust development now follows professional standards
cargo new my-project # Automatically uses Edition 2024 + standards- Edition 2024 configuration
- Comprehensive clippy lint groups enabled
- Structured Cargo.toml with metadata
- Pre-configured GitHub Actions CI/CD
- Git hooks for validation
- Professional project structure
- Clippy validation (zero warnings policy)
- Format checking and auto-correction
- Security audit scanning
- Documentation completeness verification
// β These will cause compilation to fail:
fn bad_function(_unused: String) {} // Underscore bandaid
let _ = some_result; // Ignored results
some_value.unwrap(); // Unwrap in production
edition = "2021" // Wrong edition| Command | Description |
|---|---|
ferrous-forge init |
Initialize system-wide standards (use --project for project-level setup) |
ferrous-forge status |
Show installation status and current configuration |
ferrous-forge update |
Update to latest version (supports --channel, --rules-only, --dry-run) |
ferrous-forge validate [path] |
Validate a project against standards |
ferrous-forge rollback <version> |
Rollback to a previous version |
ferrous-forge uninstall |
Remove Ferrous Forge from the system |
ferrous-forge config |
Manage configuration (--set, --get, --list, --reset) |
ferrous-forge fix [path] |
Auto-fix code violations (--dry-run, --only, --skip) |
| Command | Description |
|---|---|
ferrous-forge rust check |
Check current Rust version vs latest |
ferrous-forge rust recommend |
Get intelligent update recommendations |
ferrous-forge rust list |
List recent Rust releases |
| Command | Description |
|---|---|
ferrous-forge edition check |
Check edition compliance |
ferrous-forge edition analyze |
Analyze compatibility before migrating |
ferrous-forge edition migrate [edition] |
Migrate to a new edition (default: 2024) |
| Command | Description |
|---|---|
ferrous-forge safety check |
Run safety checks (--stage=pre-commit|pre-push) |
ferrous-forge safety test |
Test all safety checks |
ferrous-forge safety status |
View safety pipeline status |
ferrous-forge safety install |
Install git hooks for the safety pipeline |
| Command | Description |
|---|---|
ferrous-forge template |
Manage project templates |
The repository includes comprehensive CI/CD workflows. To use them in your fork:
-
Codecov Integration (optional):
- Sign up at codecov.io
- Add your repository
- Add
CODECOV_TOKENto your repository secrets
-
GitHub Pages (for documentation):
- Go to Settings β Pages
- Enable GitHub Pages
- Set source to "GitHub Actions"
- cargo-nextest: Pinned to v0.9.72 for Rust 1.82 compatibility
- Code coverage: Requires Codecov token to avoid rate limits
- Benchmarks: Run in non-failing mode for stability
Ferrous Forge supports hierarchical configuration (system, user, project levels). Key configurable values:
| Setting | Default | Description |
|---|---|---|
max_file_lines |
300 | Maximum lines per file |
max_function_lines |
50 | Maximum lines per function |
required_edition |
2024 | Required Rust edition |
ban_underscore_bandaid |
true | Ban _parameter patterns |
require_documentation |
true | Require RustDoc on public APIs |
auto_update |
true | Automatically check for updates |
update_channel |
stable | Release channel (stable/beta/nightly) |
# View all settings
ferrous-forge config --list
# Change a setting
ferrous-forge config --set max_file_lines=400
# Reset to defaults
ferrous-forge config --reset- π¦ Rust Ecosystem Guide β New to Rust? Start here!
- Installation Guide β Detailed setup instructions
- Configuration β Customizing rules and settings
- Standards Reference β Complete list of enforced rules
- Integration Guide β IDE and tool integration
- Troubleshooting β Common issues and solutions
- Migration Guide β Upgrading existing projects
We welcome contributions! Ferrous Forge is built with modern Rust practices:
- Rust Edition 2024 (of course!)
- 100% Safe Rust (no unsafe code)
- Comprehensive Testing (unit, integration, property-based)
- CI/CD Pipeline (automated testing, releases, security)
- Documentation First (every public API documented)
See CONTRIBUTING.md for detailed guidelines.
git clone https://github.com/kryptobaseddev/ferrous-forge
cd ferrous-forge
cargo install --path .
cargo test --all-features
cargo doc --openFerrous Forge operates at multiple levels:
βββββββββββββββββββββββββββββββββββββββββββ
β System Level β
βββββββββββββββββββββββββββββββββββββββββββ€
β β’ Global Cargo configuration β
β β’ Cargo/rustc command interception β
β β’ Rust toolchain management β
βββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββ
β Project Level β
βββββββββββββββββββββββββββββββββββββββββββ€
β β’ Template injection β
β β’ Git hook installation β
β β’ CI/CD configuration β
βββββββββββββββββββββββββββββββββββββββββββ
βββββββββββββββββββββββββββββββββββββββββββ
β Runtime Level β
βββββββββββββββββββββββββββββββββββββββββββ€
β β’ Clippy rule enforcement β
β β’ Real-time validation β
β β’ Documentation coverage checks β
βββββββββββββββββββββββββββββββββββββββββββ
- Sandboxed execution β No elevated privileges required
- Dependency scanning β Automatic vulnerability detection via
cargo audit - Supply chain awareness β Integrates with Rust security advisories
Licensed under either of:
- Apache License, Version 2.0 (LICENSE-APACHE)
- MIT License (LICENSE-MIT)
at your option.
- Issues: Bug Reports & Feature Requests
- Discussions: GitHub Discussions
Hey there, fellow Rustaceans! π This is my very first Rust crate, and I am absolutely thrilled to share it with the community!
After months of teaching myself Rust (what an incredible journey it's been!), and with the amazing power of Claude Code accelerating my learning exponentially, I've built something I hope you'll find useful. This tool was born from my own frustration with inconsistent code standards across projects, and my desire to enforce professional-grade Rust practices automatically.
I'm super excited to learn and grow with the Rust community! π¦β¨
- π€ Think this tool is useful? Please let me know!
- π Think this is a stupid tool with no real need? Tell me that too - you can't hurt my feelings! (LOL)
- π Have ideas for improvements? I'm all ears!
- π€ Want to contribute? I'd be honored to have your help!
- π Spot any Rust anti-patterns? Please teach me - I'm here to learn!
This is as much about my Rust learning journey as it is about building something useful. Thank you for taking the time to look at my work and for joining me on this adventure! π
Forge better Rust, automatically. π¨
β Star us on GitHub β’ π¦ Install from Crates.io β’ π Read the Docs