soph_runtime/support/
mod.rs

1
2
3
4
5
6
7
8
9
10
use crate::Runtime;
use std::sync::OnceLock;

mod runtime;

static RUNTIME: OnceLock<Runtime> = OnceLock::new();

pub fn runtime() -> &'static Runtime {
    RUNTIME.get_or_init(|| Runtime::new().unwrap_or_else(|err| panic!("{err}")))
}