From bb7c7d2f7d9bd9ad074c0186f5d503ee96b2f106 Mon Sep 17 00:00:00 2001 From: HampusM Date: Sat, 9 Aug 2025 12:37:46 +0200 Subject: fix(ecs): remove use of linkme to make pc-windows-gnu builds work Linkme is broken on the x86_64-pc-windows-gnu target (see https://github.com/dtolnay/linkme/issues/25) so static entities are now called entity declarations and must be created manually. --- ecs/src/phase.rs | 16 +++++++++++----- 1 file changed, 11 insertions(+), 5 deletions(-) (limited to 'ecs/src/phase.rs') diff --git a/ecs/src/phase.rs b/ecs/src/phase.rs index 9f47fb8..c13c432 100644 --- a/ecs/src/phase.rs +++ b/ecs/src/phase.rs @@ -1,13 +1,19 @@ use ecs_macros::Component; use crate::pair::{ChildOf, Pair}; -use crate::static_entity; +use crate::{declare_entity, World}; #[derive(Debug, Default, Clone, Copy, Component)] pub struct Phase; -static_entity!(pub START, (Phase,)); +declare_entity!(pub START, (Phase,)); +declare_entity!(pub PRE_UPDATE, (Phase,)); +declare_entity!(pub UPDATE, (Phase, Pair::new::(*PRE_UPDATE))); -static_entity!(pub PRE_UPDATE, (Phase,)); - -static_entity!(pub UPDATE, (Phase, Pair::new::(*PRE_UPDATE))); +#[doc(hidden)] +pub(crate) fn spawn_entities(world: &mut World) +{ + world.create_declared_entity(&START); + world.create_declared_entity(&PRE_UPDATE); + world.create_declared_entity(&UPDATE); +} -- cgit v1.2.3-18-g5258