ferrous_forge/lib.rs
1//! # Ferrous Forge
2//!
3//! The Type-Safe Rust Development Standards Enforcer
4//!
5//! Ferrous Forge is a comprehensive system-wide tool that automatically enforces
6//! professional Rust development standards across all projects on your machine.
7//!
8//! @task T016
9//! @epic T014
10//!
11//! ## Features
12//!
13//! - Zero underscore bandaid coding enforcement
14//! - Edition 2024 automatic upgrades
15//! - System-wide cargo command hijacking
16//! - Automatic project template injection
17//! - Real-time code validation
18//! - Professional CI/CD setup
19//!
20//! ## Quick Start
21//!
22//! ```rust,no_run
23//! use ferrous_forge::{Config, Result};
24//!
25//! #[tokio::main]
26//! async fn main() -> Result<()> {
27//! // Load or create default configuration
28//! let config = Config::load_or_default().await?;
29//! println!("Ferrous Forge v{}", ferrous_forge::VERSION);
30//! println!("Required edition: {}", config.required_edition);
31//! Ok(())
32//! }
33//! ```
34//!
35//! ### CLI Usage
36//!
37//! ```bash
38//! cargo install ferrous-forge
39//! ferrous-forge init
40//! cargo new my-project # Now follows all standards automatically
41//! ```
42//!
43//! ## Modules
44//!
45//! ### Core
46//! - [`cli`] — Command line interface definitions and argument parsing
47//! - [`commands`] — Implementation of all Ferrous Forge commands
48//! - [`config`] — Configuration management and hierarchical config system
49//! - [`error`] — Error types and result handling
50//!
51//! ### Standards & Validation
52//! - [`standards`] — Development standards definitions and enforcement
53//! - [`validation`] — Core validation logic and rule enforcement
54//! - [`safety`] — Safety pipeline and enforcement mechanisms
55//! - [`formatting`] — Code formatting enforcement and validation
56//!
57//! ### Rust Ecosystem
58//! - [`edition`] — Rust edition management and upgrade assistance
59//! - [`rust_version`] — Rust version checking and compatibility validation
60//! - [`doc_coverage`] — Documentation coverage checking and reporting
61//! - [`security`] — Security auditing and vulnerability scanning
62//! - [`test_coverage`] — Test coverage integration and reporting
63//!
64//! ### Tooling
65//! - [`templates`] — Project template system and built-in templates
66//! - [`git_hooks`] — Git hooks installation and management
67//! - [`cargo_intercept`] — Cargo command interception for publish validation
68//! - [`updater`] — Self-update functionality and version management
69//!
70//! ### Analysis
71//! - [`ai_analyzer`] — AI-powered violation analysis and fix suggestions
72//! - [`performance`] — Performance optimizations for validation
73
74#![forbid(unsafe_code)]
75#![warn(missing_docs)]
76#![cfg_attr(docsrs, feature(doc_cfg))]
77
78/// AI-powered violation analysis and fix suggestions
79pub mod ai_analyzer;
80/// Cargo command interception for publish validation
81pub mod cargo_intercept;
82/// Command line interface definitions and argument parsing
83pub mod cli;
84/// Implementation of all Ferrous Forge commands
85pub mod commands;
86/// Configuration management and hierarchical config system
87pub mod config;
88/// Documentation coverage checking and reporting
89pub mod doc_coverage;
90/// Rust edition management and upgrade assistance
91pub mod edition;
92/// Error types and result handling
93pub mod error;
94/// Code formatting enforcement and validation
95pub mod formatting;
96/// Git hooks installation and management
97pub mod git_hooks;
98/// Performance optimizations for validation
99pub mod performance;
100/// Rust version checking and compatibility validation
101pub mod rust_version;
102/// Safety pipeline and enforcement mechanisms
103pub mod safety;
104/// Security auditing and vulnerability scanning
105pub mod security;
106/// Development standards definitions and enforcement
107pub mod standards;
108/// Project template system and built-in templates
109pub mod templates;
110/// Test coverage integration and reporting
111pub mod test_coverage;
112/// Self-update functionality and version management
113pub mod updater;
114/// Core validation logic and rule enforcement
115pub mod validation;
116
117// Re-export commonly used types
118pub use crate::config::Config;
119pub use crate::error::{Error, Result};
120
121/// Current version of Ferrous Forge
122pub const VERSION: &str = env!("CARGO_PKG_VERSION");
123
124/// Minimum supported Rust version
125pub const MIN_RUST_VERSION: &str = "1.82.0";
126
127/// Edition enforced by Ferrous Forge
128pub const REQUIRED_EDITION: &str = "2024";