pub type ID = std::any::TypeId; pub trait LuaBindings { fn globals<'a>(&self, lua: &'a mlua::Lua) -> mlua::Table<'a>; fn id(&self) -> &'static str; } pub trait Component: 'static { fn lua_bindings(&self) -> Option> { None } } pub fn component_id() -> ID { std::any::TypeId::of::() } pub trait Global: 'static { } pub fn global_id() -> ID { std::any::TypeId::of::() }