diff options
author | HampusM <hampus@hampusmat.com> | 2025-08-09 12:37:46 +0200 |
---|---|---|
committer | HampusM <hampus@hampusmat.com> | 2025-08-09 13:50:46 +0200 |
commit | bb7c7d2f7d9bd9ad074c0186f5d503ee96b2f106 (patch) | |
tree | d58ed365764f320e3403c9ebd00f1b9d687217d5 /ecs/src/extension.rs | |
parent | 2d1cf05abb72699d38a7c7db7e131922252e1fc1 (diff) |
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.
Diffstat (limited to 'ecs/src/extension.rs')
-rw-r--r-- | ecs/src/extension.rs | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/ecs/src/extension.rs b/ecs/src/extension.rs index 42ebef9..e180ac7 100644 --- a/ecs/src/extension.rs +++ b/ecs/src/extension.rs @@ -1,4 +1,5 @@ use crate::component::Sequence as ComponentSequence; +use crate::entity::Declaration as EntityDeclaration; use crate::sole::Sole; use crate::system::System; use crate::uid::Uid; @@ -42,6 +43,12 @@ impl<'world> Collector<'world> self.world.create_entity(components); } + /// Adds a declared entity to the [`World`]. + pub fn add_declared_entity(&mut self, entity_decl: &EntityDeclaration) + { + self.world.create_declared_entity(entity_decl); + } + /// Adds a globally shared singleton value to the [`World`]. /// /// # Errors |