use crate::error::Result;
use crate::runtime::Runtime;
use crate::topology::SystemCommunicator;
#[derive(Clone, Debug)]
pub struct Universe {
runtime: Runtime,
}
impl Universe {
pub(crate) fn new(runtime: Runtime) -> Self {
Self { runtime }
}
pub fn world(&self) -> SystemCommunicator {
SystemCommunicator::new(self.runtime.clone())
}
}
pub fn initialize() -> Result<Universe> {
let runtime = Runtime::detect()?;
Ok(Universe::new(runtime))
}