←back to thread

48 points zigrazor | 2 comments | | HN request time: 0.444s | source

Hi HN!

I've built [CXXStateTree](https://github.com/ZigRazor/CXXStateTree), a modern C++ header-only library to create hierarchical state machines with clean, intuitive APIs.

It supports: - Deeply nested states - Entry/exit handlers - State transitions with guards and actions - Asynchronous transitions with `co_await` (C++20 coroutines) - Optional runtime type identification for flexibility

It's ideal for complex control logic, embedded systems, games, robotics, and anywhere you'd use a finite state machine.

I’d love feedback, use cases, or contributions from the community!

Repo: https://github.com/ZigRazor/CXXStateTree

1. baymotion ◴[] No.44525188[source]
Related idea for those using python: https://github.com/baymotion/smax.
replies(1): >>44529076 #
2. zigrazor ◴[] No.44529076[source]
I want to create a python binding with PyBind11 and create a simple interface with a very good performance for Embedded systems