zkstack_cli_common 0.1.2

ZK Stack CLI is a set of tools for working with zk stack.
Documentation
use once_cell::sync::OnceCell;

static CONFIG: OnceCell<GlobalConfig> = OnceCell::new();

pub fn init_global_config(config: GlobalConfig) {
    CONFIG
        .set(config)
        .expect("GlobalConfig already initialized");
}

pub fn global_config() -> &'static GlobalConfig {
    CONFIG.get().expect("GlobalConfig not initialized")
}

#[derive(Debug)]
pub struct GlobalConfig {
    pub verbose: bool,
    pub chain_name: Option<String>,
    pub ignore_prerequisites: bool,
}