a Rust library for creating hierarchical state machines
I've come to prefer modeling state machines with nested states, but implementing them by hand requires a large amount of error-prone boilerplate that obscures the important logic of the state machine. I found that the existing offerings in the Rust ecosystem - while inspiring - lacked a number of features that I was looking for, so I spent the last few months building moku. Feedback is welcome!
a Rust library for creating hierarchical state machines launched on February 28, 2025 with 38 votes, #537 of 5,999 launches that month and more than 90% of that year's launches. The site was still online in September 2026, 1 year on.
In plain words
Moku is a Rust library for building hierarchical state machines with nested states. It reduces boilerplate code that typically obscures state machine logic when implemented manually. The library provides features designed to address gaps in existing Rust state machine tools, making it easier for developers to create complex state machine implementations without error-prone repetitive code.
written from the facts on this page · September 2026
From the sources
moku
Moku is a Rust library for creating hierarchical state machines. While it’s also useful for creating flat state machines, nested states are a first-class feature. Though it may be impure to store data inside of states, in practice it is often useful for states to hold some data (e.g. file handles, perf counters, etc) and to allow substates and external code to access that data. This is also a core feature of moku. Because moku generates a tree of sum types to represent the state machine, states must be Sized and do not support generic parameters (though generics can be used behind type aliases). A hierarchical state machine (HSM) is a type of finite state machine where states can be nested…from docs.rs
Does a similar job
all alternatives →
Coerce – Actor runtime for Rust using async/await and tokio channels2019 · github.com · ▲155Actor runtime and distributed systems framework for Rust - LeonHartley/Coerce-rs
CXXStateTree – A modern C++ library for hierarchical state machines2025 · github.com · ▲48Hi 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…
- WRWagyu – Rust library for generating cryptocurrency wallets2019 · github.com · ▲81
Maki2022 · maki.sh · ▲84An efficient AI coding agent. Native Rust TUI. Immediate startup, 60 FPS, low memory. Indexes files instead of reading them, chains tools in a sandbox interpreter. Anthropic, OpenAI, Google, Z.AI, OpenRouter, Synthetic, or any OpenAI / Anthropic compatible API.
I built a native app for coding agents with Rust and GPUIAug 2026 · waku.sh · ▲39A fast, native app for local coding agents. Amp, Claude Code, Codex, Cursor, OpenCode, Grok, and Pi — one timeline, entirely on your machine.
Minikv – Distributed key-value and object store in Rust (Raft, S3 API)Feb 2026 · github.com · ▲71Hi HN, I'm Emilie, I have a literature background (which explains the well-written documentation!) and I've been learning Rust and distributed systems by building minikv over the past few months. It recently got featured in Programmez! magazine: https://www.programmez.com/actualites/minikv-un-key-value-st... minikv is an open-source, distributed storage engine built for learning, experimentation, and self-hosted setups. It combines a strongly-consistent key-value database (Raft), S3-compatible object storage, and basic multi-tenancy. Features/highlights: - Raft…
More dev tools this month
the category →

open-source IDE for thoughtful software design. Contribute to devdotfast/whiteboard development by creating an account on GitHub.
Dev tools · 27d ago · github.com

Contribute to reladraw/reladraw development by creating an account on GitHub.
Dev tools · 25d ago · github.com
OpenBot▲362Grok Bot alternative: free, local, open-source, multiplayer
Dev tools · 22d ago · openbot.run
Talanoa▲340Hi HN, I’m a fullstack developer, and honestly, I’ve lost count of how many side projects I’ve worked on over the years. But one idea kept coming back to me: a different kind of email client. It first came to me in 2014: “What if we could handle emails more like conversations?” Every year, I’d revisit this concept in my “Build Notes.” Ten years later, no one had built exactly what I had in mind — so I finally decided to do it myself. That’s how Talanoa was born. I wanted something focused on people, not timelines. I was tired of marking messages as unread just to remember to reply later, or…
Dev tools · 20d ago · talanoa.email
CoreSpeed▲332One MCP for everything your agents need: apps, memory, tools
Dev tools · 27d ago · corespeed.io
Source: Show HN post ↗
Launched alongside, February 2025
the whole month →
Screen Studio 3.0▲1,832Beautiful screen recordings with instant shareable links
Growth · 2025 · screen.studio

- IG
I was at FB/Meta from late 2013 to early 2023, mostly working in the compiler/runtime spaces. I got hit in the spring 2023 layoff wave. I immediately started making games in my newfound free time (a lifelong interest, and I even worked in AA(A?) back ca. ~2000), and in October 2023 I stumbled upon the idea of a roguelike pachinko/plinko game inspired by Luck Be A Landlord. Things snowballed quickly, I started talking to publishers, then worked like crazy through all of 2024, almost the hardest I've ever worked in my career, and launched the game in December 2024. It's sold…
Work · 2025



i wanted to change the habit of reaching for my phone in the morning and doomscrolling away an hour so i built an app to help me. now i have to literally touch grass before accessing my most distracting apps the app is built in swiftui, uses the screen time apis provided by apple and google vision to recognise grass or not i'd love to get your thoughts on the concept.
Life & fun · 2025 · touchgrass.now