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 dashboard;
35pub mod dependencies;
36pub mod deployment;
37pub mod doctor;
38pub mod exploit;
39pub mod fuzzing;
40pub mod gas;
41pub mod history;
42pub mod importer;
43pub mod notify;
44pub mod parser;
45pub mod plugins;
46pub mod reports;
47pub mod sbom;
48pub mod security;
49pub mod suppressions;
50pub mod templates;
51pub mod utils;
52
53// Used by integration tests — only available as a dev-dependency
54#[cfg(test)]
55#[allow(unused_extern_crates)]
56extern crate tempfile;
57
58use anyhow::Result;
59
60/// Run the forge-guard CLI with the given command-line arguments.
61/// Primary entry point for the binary.
62pub fn run_cli() -> Result<()> {
63    let app = cli::Cli::from_env();
64    app.run()
65}