lang: remove this attempt
This commit is contained in:
parent
1c6180aabc
commit
eb7806572b
19 changed files with 1 additions and 1885 deletions
|
@ -1,55 +0,0 @@
|
|||
use std::{
|
||||
fmt::Display,
|
||||
path::{Path, PathBuf},
|
||||
sync::{Arc, Mutex},
|
||||
};
|
||||
|
||||
use crate::world::world_creation_pool::WorldCreationPool;
|
||||
|
||||
use easy_parallel::Parallel;
|
||||
use futures_lite::future;
|
||||
use smol::{
|
||||
channel::{unbounded, Sender},
|
||||
Executor,
|
||||
};
|
||||
|
||||
use self::{error::Error, files::Files, registry::Registry};
|
||||
|
||||
pub mod error;
|
||||
pub mod files;
|
||||
pub mod modules;
|
||||
pub mod nodes;
|
||||
pub mod registry;
|
||||
mod world_creation_pool;
|
||||
|
||||
pub struct World {}
|
||||
|
||||
impl World {
|
||||
pub fn new(entry_point: &Path) -> Result<Self, WorldCreationError> {
|
||||
let files = Files::new();
|
||||
let reg = Registry::new();
|
||||
|
||||
let (entry_point_id, errors) = files.add_and_parse(entry_point).map_err(|e| {
|
||||
WorldCreationError::FailedToOpenEntryPoint(entry_point.to_path_buf(), e)
|
||||
})?;
|
||||
|
||||
let pool = WorldCreationPool::new(files, reg);
|
||||
|
||||
todo!()
|
||||
}
|
||||
}
|
||||
|
||||
#[derive(Debug)]
|
||||
pub enum WorldCreationError {
|
||||
FailedToOpenEntryPoint(PathBuf, std::io::Error),
|
||||
}
|
||||
|
||||
impl Display for WorldCreationError {
|
||||
fn fmt(&self, f: &mut std::fmt::Formatter<'_>) -> std::fmt::Result {
|
||||
match self {
|
||||
WorldCreationError::FailedToOpenEntryPoint(entry_path, e) => {
|
||||
write!(f, "failed to open entry_point '{entry_path:?}': {e}")
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Loading…
Add table
Add a link
Reference in a new issue