Skip to main content

forge_guard/
lib.rs

1//! # Forge Guard
2//!
3//! Pre-deployment smart contract auditing framework for Foundry.
4//!
5//! Transforms security auditing from an optional step into a mandatory
6//! pre-deployment process, providing developers with comprehensive
7//! offline smart contract auditing capabilities.
8
9#![deny(unsafe_code)]
10#![warn(unused_crate_dependencies)]
11
12// Suppress unused dependency warnings for crates used in future features
13#[allow(unused_extern_crates)]
14extern crate duct;
15#[allow(unused_extern_crates)]
16extern crate globset;
17#[allow(unused_extern_crates)]
18extern crate hex;
19#[allow(unused_extern_crates)]
20extern crate sha2;
21#[allow(unused_extern_crates)]
22extern crate tera;
23#[allow(unused_extern_crates)]
24extern crate terminal_size;
25#[allow(unused_extern_crates)]
26extern crate tokio;
27
28pub mod ai;
29pub mod benchmark;
30pub mod chains;
31pub mod ci;
32pub mod cli;
33pub mod core;
34pub mod dependencies;
35pub mod deployment;
36pub mod doctor;
37pub mod exploit;
38pub mod fuzzing;
39pub mod gas;
40pub mod importer;
41pub mod notify;
42pub mod parser;
43pub mod plugins;
44pub mod reports;
45pub mod sbom;
46pub mod security;
47pub mod suppressions;
48pub mod templates;
49pub mod utils;
50
51// Used by integration tests — only available as a dev-dependency
52#[cfg(test)]
53#[allow(unused_extern_crates)]
54extern crate tempfile;
55
56use anyhow::Result;
57
58/// Run the forge-guard CLI with the given command-line arguments.
59/// Primary entry point for the binary.
60pub fn run_cli() -> Result<()> {
61    let app = cli::Cli::from_env();
62    app.run()
63}