Flecs-Rust
Flecs-Rust copied to clipboard
PATCH: Allow creating hooks for untyped components.
This patch allows creating hooks for untyped components, they receive c_void mutable ptr instead of typed reference (maybe creating a meta cursor instead could be a good idea?). Also this patch improves default hook detection logic using simple boolean in binding context instead of quirky fn ptr comparison. The Rust documentation specifies that fn ptr comparison can return false in any case so it is unreliable anyway.
Note that I'm using this crate for about 3 days and adapting it for my use cases (that's why I submit a patch instead of pull request), so take this patch with a grain of salt, I could miss something obvious.
0000-feat(UntypedComponent)-allow-creating-hooks-for-.tar.gz