Skip to content

Commit 54a2c34

Browse files
committed
N36: hecs
1 parent df9c37b commit 54a2c34

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

content/news/036/index.md

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -76,6 +76,22 @@ If needed, a section can be split into subsections with a "------" delimiter.
7676

7777
## Library Updates
7878

79+
### [hecs]
80+
81+
[hecs] is a fast, lightweight, and unopinionated archetypal ECS library.
82+
83+
[Version 0.8](hecs-changelog) marks a breaking change to most methods that
84+
previously took a generic type parameter `T: Component`, replacing them with
85+
methods taking type parameters which must be *references to* component types
86+
instead. This resolves a long-standing footgun where users accustomed to writing
87+
`&T` in queries might write `world.get::<&T>`, interpreted by rustc as
88+
referencing the valid component type `&'static T`, resulting in code that
89+
compiles but fails to access the intended component.
90+
91+
[hecs]: https://github.com/Ralith/hecs
92+
[hecs-changelog]: https://github.com/Ralith/hecs/blob/master/CHANGELOG.md#080
93+
94+
7995
## Popular Workgroup Issues in Github
8096

8197
<!-- Up to 10 links to interesting issues -->

0 commit comments

Comments
 (0)