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