Overview of zigfsm features
mainzigfsm is a finite state machine library for Zig that supports versions from 0.12.x up to 0.16. It is designed for high performance and low overhead. Key features include:
- Zero Allocation: The library never performs heap allocations.
- Hybrid Execution: Works at both
comptimeand runtime. - Efficiency: Fast transition validation and a compact memory representation.
- Visualization: State machines can be exported to Graphviz DOT format for visualization.
- Flexible Definition: Define machines programmatically or by importing Graphviz or
libfsmtext (even atcomptime). - Automation: Imported machines can autogenerate state and event enums.
- Extensibility: Optional event listeners allow for adding functionality or canceling transitions.
- Advanced Patterns: Easy to wrap for push-down automata (e.g., GameState pattern).
Supported platforms: Linux, macOS, FreeBSD, and Windows.