thcThought Control

iocraft

React-style declarative TUIs and CLI output for Rust.

github.com ↗repo ↗docs ↗HN launch ↗Rust forum announcement ↗

license
MIT OR Apache-2.0 · Dual-licensed at the user's option (GitHub reports Apache-2.0).
language
Rust
backing
Individual: Chris Brown (ccbrown).
stars
1,557 (as of 2026-10-09)
downloads
187k all-time, 53k in the last 90 days (crates.io); 15 reverse dependencies
latest release
iocraft-v0.9.1, 2026-09-04
first release
2024-09
ignore

A code-first Rust alternative to ratatui; nothing scene would build on, only minor ideas to borrow.

Ignore it for this purpose.

the steelman: the best honest case for it

iocraft is the answer for Rust developers who find ratatui's immediate mode too low-level: you write components with props, state and hooks like React, lay them out with flexbox (taffy), and get one tree that can be printed to a log, animated inline in a CLI or run as a fullscreen app on Unix and Windows. That inline/print-first design suits developer tools — which is why moonrepo's moon and proto and cachix's devenv use it — and the API is small, readable and dual-licensed MIT/Apache.

scores
datadriveseeedittimeratetermpxteachmatureopen
UI as data3 scene 5Declarative macro in Rust; not serializable
Agent can drive it1 scene 5
Agent can see it2 scene 5Render-to-string for tests only
Small, targeted edits0 scene 5
Time travel0 scene 0
Live data rate2 scene 5No numbers; hook-driven rerender
Terminal native5 scene 5
Pixel graphics0 scene 4
Teaching1 scene 3
Maturity3 scene 1Used in production by moonrepo and devenv, small ecosystem
Openness4 scene 4Permissive, single-maintainer control

iocraft scene now scene planned

how agents use it

How

Code generation only.

Wiring it in

Same as any library: the app author builds a control channel.

Seeing the result

Elements can be rendered to a string; otherwise screen scraping.

Small edits

None from outside.

History

None.

In short

Pleasant declarative Rust API, no agent surface.

architecture

React/Dioxus-style component model in Rust: an element! macro declares trees of components (View, Text, TextInput, …), #[component] functions receive props and Hooks (use_state, use_future, use_context, use_terminal_events), and the runtime re-renders on state change. Layout is flexbox via taffy. The same tree can be printed once to any output (logs, non-TTY), rendered as an inline animated region, or run fullscreen; props and context can be passed by reference to avoid cloning.

performance

No published numbers.

adoption and upkeep

Adoption

Small but real adoption in Rust developer tooling.

Used by: moonrepo moon and proto (via starbase_console), cachix devenv

Maintainability

Actively maintained single-author project.

Releases: Every few weeks to months: v0.8.2 2026-04-28, v0.8.3 05-23, v0.8.4 07-13, v0.8.5 08-20, v0.9.0/0.9.1 09-04. · Contributors: ~27 (GitHub contributors API incl. anonymous) · Recent: ~28 commits, 26 merged PRs since 2026-07-11 (GitHub API) · Bus factor: low: ccbrown has ~194 of the commits; next human contributor 9

weaknesses
and thc-scene

Overlap

Rust, declarative component tree, flexbox layout, inline-or-fullscreen rendering.

What scene would be reinventing

Little — scene's declarative tree is data, not a macro DSL; component vocabulary overlaps.

The gap it leaves

Everything agent-facing: serializable UI, socket control, readback, streams, pixels, hot-swap, time travel.

What to borrow

  • Inline (non-fullscreen) render mode and print-once mode for one-shot scene output
  • taffy as a flexbox engine if scene needs richer layout
sources
  1. GitHub API repos/ccbrown/iocraft api.github.com
  2. iocraft README github.com
  3. crates.io iocraft crates.io
  4. crates.io reverse dependencies crates.io
  5. HN: Iocraft news.ycombinator.com
  6. HN: React model in Rust TUI libraries news.ycombinator.com