Skip to content

Instantly share code, notes, and snippets.

View alex-lawson's full-sized avatar

Alex Lawson alex-lawson

View GitHub Profile
@HexyWitch
HexyWitch / ecs.rs
Last active December 3, 2018 23:33
Small rust ECS
use std::any::{Any, TypeId};
use std::cell::{Ref, RefCell, RefMut};
use std::collections::HashMap;
type ComponentMap = HashMap<TypeId, RefCell<Box<Any>>>;
pub trait ComponentSetMutRefs<'a> {
type MutRefs;
}
pub trait ComponentSet {