//! Initialise a repository and inspect its initial world through `lib_efo`. use std::{env, error::Error, path::PathBuf}; use lib_efo::workspace::Workspace; fn main() -> Result<(), Box> { let root = env::args_os() .nth(1) .map(PathBuf::from) .ok_or("usage: cargo run -p lib_efo --example repository -- ")?; let mut workspace = Workspace::initialize(&root, env!("CARGO_PKG_VERSION"))?; println!("repository: {}", workspace.root().display()); println!("current epoch: {}", workspace.head.epoch_id); println!( "entities: {}", workspace.head.iter_all_entities_mut().count() ); Ok(()) }