soon_migrate/lib.rs
1//! # Soon Migrate
2//!
3//! A CLI tool for migrating Solana Anchor projects to the SOON Network.
4//!
5//! This library provides the core functionality for the `soon-migrate` binary,
6//! including configuration management, oracle detection, and migration logic.
7//!
8//! ## Features
9//! - Migration of Solana Anchor project configurations
10//! - Oracle detection and analysis
11//! - Backup and restore functionality
12//! - Detailed reporting and recommendations
13
14#![warn(missing_docs)]
15#![forbid(unsafe_code)]
16#![warn(rust_2018_idioms)]
17#![warn(clippy::all, clippy::pedantic)]
18
19/// Command-line interface configuration and argument parsing.
20///
21/// This module handles the definition and parsing of command-line arguments,
22/// providing a clean interface for the rest of the application to access
23/// user-provided configuration.
24pub mod cli;
25
26/// Error types used throughout the crate.
27///
28/// This module defines the error types and error handling utilities used
29/// across the application, ensuring consistent error reporting and handling.
30pub mod errors;
31
32/// Core migration logic and functionality.
33///
34/// This module contains the main migration logic, including configuration
35/// file parsing, backup/restore functionality, and the core migration process.
36pub mod migration;
37
38/// Oracle detection and analysis.
39///
40/// This module provides functionality to detect and analyze oracle usage
41/// in Solana programs, with support for various oracle providers like
42/// Pyth, Switchboard, and Chainlink.
43pub mod oracle;
44
45/// Re-export commonly used items for easier access
46pub use cli::*;
47pub use errors::MigrationError;
48pub use migration::*;
49pub use oracle::*;
50
51/// The current version of the soon-migrate crate.
52///
53/// This is automatically set from the `Cargo.toml` version field.
54pub const VERSION: &str = env!("CARGO_PKG_VERSION");