StateSmith is a cross platform, free/open source tool for generating state machines in multiple programming languages. The generated code is human readable, has zero dependencies and is suitable for use with tiny bare metal microcontrollers, video games, apps, web, computers... It avoids dynamic memory allocations for the safety or performance inclined.
The above is my current plan, but I'll gladly help anyone add a new language. I'm hoping contributors will help me with this effort.
The fundamentals-1 webpage has simple interactive examples that let you explore most StateSmith features.
Want to jump right in and just try it!? Tutorial-2 will get you up and running as quick as possible.
Our announcements discord channel is updated when new tutorials and features are added.
The StateSmith-examples repo has a growing list of examples showcasing different application uses.
If you like StateSmith and want to help improve it, your help would be very much appreciated! StateSmith is a pretty decent tool right now, but it is going to take a team to elevate it to the next level.
- You can help without writing code. StateSmith needs more user feedback/guidance before it can hit version 1.0.
- If you are up for coding, check out Contributing.
Thanks!
StateSmith is generating working code, and has decent test (420+) and behavior specification coverage. There are 45+ specification integration tests that read a diagram file, generate executable state machine code, then compile and execute that code in another process and ensure that the state machine behavior is exactly what was expected. This strong test base gives me confidence. It also allows us to refactor and optimize StateSmith without fear of accidentally breaking specified behavior.
Every aspect of state behavior is verified during specification testing.
Breaking changes and migration steps will be documented in ./CHANGELOG.md and should be pretty minimal.
The StateSmith GitHub wiki has a good amount of documentation right now, but always feel free to ask a question.
Join us on discord.
Feel free to open a github issue.
Or you can use the project's discussion space.