Purrgress: A zero-allocation state-machine and animation queue library driven by procedural macros

โš“ Rust    ๐Ÿ“… 2026-06-12    ๐Ÿ‘ค surdeus    ๐Ÿ‘๏ธ 1      

surdeus

I'd like to share my library. This library almost completely abandons dynamic dispatching or heap allocations. You set all the necessary states at program startup, using macros whose writing is controlled by the compiler, or manually using the tools typically used by the macros themselves. Later, you call just one update function within the loop. The animator, with its "animator" feature, is designed on a similar principle, allowing you to conveniently synchronize your animations with the main queue. My library collects queues rather than storing a single stage, allowing you to conveniently append, delete, completely rebuild, or insert any stage into the desired part of the queue. The library supports nesting, meaning you can create multiple state managers within a single one. The library implements a single nested structure, but you can easily understand how a multi-nested structure works by observing the animator. But the library really shines when used with a large number of different animators with a small number of stages, allowing you to create tens, if not hundreds, of thousands of such animators. Examples can be found in the README on GitHub or crates.io.

GitHub: GitHub - Honami333/purrgress: An immediate-mode stage manager and queue sequencer for Rust with compile-time dependency validation and lightweight dynamic dispatch. ยท GitHub
Crates.io: crates.io: Rust Package Registry

2 posts - 2 participants

Read full topic

๐Ÿท๏ธ Rust_feed