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