Skip to main content

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//! ## Features
9//!
10//! - Zero underscore bandaid coding enforcement
11//! - Edition 2024 automatic upgrades
12//! - System-wide cargo command hijacking
13//! - Automatic project template injection
14//! - Real-time code validation
15//! - Professional CI/CD setup
16//!
17//! ## Quick Start
18//!
19//! ```bash
20//! cargo install ferrous-forge
21//! ferrous-forge init
22//! cargo new my-project  # Now follows all standards automatically
23//! ```
24//!
25//! ## Modules
26//!
27//! - [`cli`] - Command line interface definitions
28//! - [`commands`] - Command implementations
29//! - [`config`] - Configuration management
30//! - [`standards`] - Standards definitions and enforcement
31//! - [`templates`] - Project template system
32//! - [`validation`] - Code validation and linting
33//! - [`updater`] - Self-update and version management
34
35#![forbid(unsafe_code)]
36#![warn(missing_docs)]
37#![cfg_attr(docsrs, feature(doc_cfg))]
38
39/// AI-powered violation analysis and fix suggestions
40pub mod ai_analyzer;
41/// Cargo command interception for publish validation
42pub mod cargo_intercept;
43/// Command line interface definitions and argument parsing
44pub mod cli;
45/// Implementation of all Ferrous Forge commands
46pub mod commands;
47/// Configuration management and hierarchical config system
48pub mod config;
49/// Documentation coverage checking and reporting
50pub mod doc_coverage;
51/// Rust edition management and upgrade assistance
52pub mod edition;
53/// Error types and result handling
54pub mod error;
55/// Code formatting enforcement and validation
56pub mod formatting;
57/// Git hooks installation and management
58pub mod git_hooks;
59/// Performance optimizations for validation
60pub mod performance;
61/// Rust version checking and compatibility validation
62pub mod rust_version;
63/// Safety pipeline and enforcement mechanisms
64pub mod safety;
65/// Security auditing and vulnerability scanning
66pub mod security;
67/// Development standards definitions and enforcement
68pub mod standards;
69/// Project template system and built-in templates
70pub mod templates;
71/// Test coverage integration and reporting
72pub mod test_coverage;
73/// Self-update functionality and version management
74pub mod updater;
75/// Core validation logic and rule enforcement
76pub mod validation;
77
78// Re-export commonly used types
79pub use crate::config::Config;
80pub use crate::error::{Error, Result};
81
82/// Current version of Ferrous Forge
83pub const VERSION: &str = env!("CARGO_PKG_VERSION");
84
85/// Minimum supported Rust version
86pub const MIN_RUST_VERSION: &str = "1.82.0";
87
88/// Edition enforced by Ferrous Forge
89pub const REQUIRED_EDITION: &str = "2024";