# digint/tinyfsm

A simple C++ finite state machine library

Repository: https://github.com/digint/tinyfsm
Canonical: https://ross.abutalabs.com/products/tinyfsm
Homepage: https://digint.ch/tinyfsm
Language: C++
License: MIT
License Family: permissive
Topics: c-plus-plus, header-only, cpp11, cpp-library, state-machine
Last push: 2024-06-25T23:43:36+00:00

## Health v2 (maintenance only)
Score: 32/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 35, longevity 100
- inputs: {"age_days": 4493, "days_push": 799, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: no_releases
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 1184, forks 195 (observed 2026-08-28T04:03:54.802826+00:00)

## What it is
TinyFSM is a simple, header-only C++11 finite state machine library designed for optimal performance and low memory footprint. It wraps event dispatching into function calls using template metaprogramming, with no dependency on RTTI, exceptions, or external libraries.

## Use cases
- implement a finite state machine in C++
- state machine library for real-time embedded systems
- map UML state charts to C++ code
- lightweight event dispatching without RTTI or exceptions
- header-only state machine for low-memory devices
- model on/off or elevator-style state logic in C++

## When to choose
- you need a fast, low-overhead state machine for real-time or embedded C++ projects
- you want a simple, understandable header-only library with no external dependencies
- your toolchain supports C++11 but lacks RTTI or exception support

## When to avoid
- you need hierarchical state machines with advanced UML features beyond entry/exit actions and transitions
- you work in a language other than C++ or need pre-C++11 compiler support
- you want a graphical state machine modeling tool

## Facets
- artifact type: library
- maturity: stable
- function: concurrency, developer-tools
- domain: embedded-systems, developer-tools
- platform: cpp, embedded, cross-platform
- tags: finite-state-machine, header-only, cpp11, template-metaprogramming, real-time, event-dispatching, algorithms

## Member repositories
- digint/tinyfsm (main) score 32

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:03:54.802826+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T06:24:14.404407+00:00, confidence not recorded.
  - readme: https://github.com/digint/tinyfsm (fetched 2026-08-28T04:03:54.802826+00:00, sha b46d2619b7e4)
  - homepage: https://digint.ch/tinyfsm (fetched 2026-08-29T12:31:17.105590+00:00, sha 808c3dc820ee)
  - site_page: https://digint.ch/about/contact.html (fetched 2026-08-29T12:31:17.116467+00:00, sha 7b4f23799aa5)
  - site_page: https://digint.ch/about/index.html (fetched 2026-08-29T12:31:17.114505+00:00, sha 614f66445b95)
  - site_page: https://digint.ch/about/siteinfo.html (fetched 2026-08-29T12:31:17.117915+00:00, sha 7b97ec6a8f3f)
  - site_page: https://digint.ch/tinyfsm/doc/introduction.html (fetched 2026-08-29T12:31:17.119997+00:00, sha abc51b5326e7)
- Data as of 2026-08-30T08:39:29.467469+00:00.
