# State Control v0.1.0

**URL:** <https://forum.crystal-lang.org/t/state-control-v0-1-0/5701>\
**Category:** News\
**Tags:** announces, release\
**Created:** [May 24, 2023, 10:55am UTC](https://forum.crystal-lang.org/t/state-control-v0-1-0/5701 "2023-05-24T10:55:54Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![bararchy](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/bararchy/32/33_2.png) [@bararchy](https://forum.crystal-lang.org/u/bararchy)\
**Post date:** [May 24, 2023, 10:55am UTC](https://forum.crystal-lang.org/t/state-control-v0-1-0/5701/1 "2023-05-24T10:55:54Z")

</div>

## [State Control v0.1.0](https://github.com/dammer/state_control)

This [shard](https://crystal-lang.org/reference/1.7/index.html#shards) provides a flexible state machine implementation in [Crystal](https://crystal-lang.org) programming language.

You can use any `enum` to describe different states and use the `StateControl(T)` class with that enum to create your own specific state machine class.

The `StateControl(T)` class allows you to manage transitions between states, track transition history, and monitor time spent in each state. By using this shard, you have the flexibility to define and use your own enums and state machine classes tailored to your specific needs.

---

<div class="post-metadata">

**Author:** ![konovod](https://yyz2.discourse-cdn.com/flex036/user_avatar/forum.crystal-lang.org/konovod/32/229_2.png) [@konovod](https://forum.crystal-lang.org/u/konovod)\
**Post date:** [May 26, 2023, 7:24am UTC](https://forum.crystal-lang.org/t/state-control-v0-1-0/5701/2 "2023-05-26T07:24:07Z")

</div>

Huh, nice looking inspection features!  
I have a shard for compile-time generated state machines ([GitHub - konovod/ctsm: compile-time generated FSMs for fun and profit](https://github.com/konovod/ctsm)), but never tried it in something real.
