dotrix_ecs/
ecs.rs

1use crate::world::World;
2
3/// Entity structure has only id field and represent an agregation of components
4pub struct Entity(u64);
5
6/// Any data structure can be a component
7pub trait Component: Send + Sync + 'static {
8}
9
10impl<T: Send + Sync + 'static> Component for T {}
11
12/// Trait for ECS systems
13pub trait System {
14    fn startup(&mut self, world: &mut World);
15    fn run_cycle(&mut self, world: &mut World);
16}
17