# A type-safe enum-based finite state machine for Crystal

**URL:** <https://forum.crystal-lang.org/t/a-type-safe-enum-based-finite-state-machine-for-crystal/5736>\
**Category:** News\
**Tags:** announces\
**Created:** [June 4, 2023, 2:07am UTC](https://forum.crystal-lang.org/t/a-type-safe-enum-based-finite-state-machine-for-crystal/5736 "2023-06-04T02:07:19Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![nogginly](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/nogginly/32/1795_2.png) [@nogginly](https://forum.crystal-lang.org/u/nogginly)\
**Post date:** [June 4, 2023, 2:07am UTC](https://forum.crystal-lang.org/t/a-type-safe-enum-based-finite-state-machine-for-crystal/5736/1 "2023-06-04T02:07:19Z")

</div>

> **[GitHub - nogginly/enum\_state\_machine.cr: A type-safe finite state machine for...](https://github.com/nogginly/enum_state_machine.cr)**
>
> A type-safe finite state machine for Crystal where the states are defined using \`enum\`'s. - GitHub - nogginly/enum\_state\_machine.cr: A type-safe finite state machine for Crystal where the state...

If you’ve run into `aasm` for Ruby, this is something like that but native to Crystal. I wanted to take advantage of `enum` and keep the state machine type-safe, so I chose not to use symbols.
