Flecs-Rust icon indicating copy to clipboard operation
Flecs-Rust copied to clipboard

PATCH: Allow creating hooks for untyped components.

Open r4nd0m1z3r opened this issue 8 months ago • 0 comments

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

r4nd0m1z3r avatar May 28 '25 17:05 r4nd0m1z3r