Skip to Content
OverviewWorkspace layout

Workspace Layout

FrankenTUI is organized as a Cargo workspace of 20 crates. Each crate owns one well-scoped concern — terminal I/O, layout, rendering, text, widgets, and so on — and depends only on crates below it in the layer stack. There are no cyclic dependencies.

This page is a directory map plus a per-crate status table. If you want to know where to put a change, or which crate to import, or what’s currently Reserved vs Implemented, this is the reference page.

Two bundles — frankenterm-core and frankenterm-web — appear in some specs and integration docs but are not vendored in this workspace. They are adjacent projects. The in-tree web surface is ftui-web plus the ftui-showcase-wasm target.

Directory tree

    • Cargo.toml
    • rust-toolchain.toml

Per-crate status

Core architecture

CratePurposeStatus
ftuiPublic facade + preludeImplemented
ftui-coreTerminal lifecycle, events, capabilities, animation, input parsing, gesturesImplemented
ftui-renderBuffer, diff, ANSI presenter, frame, grapheme pool, budget systemImplemented
ftui-styleStyle + theme system with CSS-like cascadingImplemented
ftui-textSpans, segments, rope editor, cursor, BiDi, shaping, normalizationImplemented
ftui-layoutFlex + Grid solvers, pane workspace system (9K+ lines), e-graph optimizerImplemented
ftui-runtimeElm/Bubbletea runtime, effect system, subscriptions, rollout policy, telemetryImplemented
ftui-widgets80+ direct Widget / StatefulWidget implementationsImplemented
ftui-extrasFeature-gated add-ons, VFX rasterizer (opt-level=3)Implemented

Backend & platform

CratePurposeStatus
ftui-backendBackend abstraction layerImplemented
ftui-ttyTTY terminal backendImplemented
ftui-webWeb/WASM adapter with pointer/touch parity, DPR/zoom handlingImplemented
ftui-showcase-wasmWASM build of the demo showcaseImplemented

Testing & verification

CratePurposeStatus
ftui-harnessShadow-run comparison, benchmark gate, rollout scorecard, determinism fixturesImplemented
ftui-ptyPTY-based test utilities (integrates with external frankenterm-core)Implemented
ftui-demo-showcase46 interactive demo screens + snapshot testsImplemented
doctor_frankentuiIntegrated TUI capture, seeding, suite reporting, coverage gatingImplemented

Supporting

CratePurposeStatus
ftui-a11yAccessibility tree and node structuresImplemented
ftui-i18nInternationalization supportImplemented
ftui-simdSIMD accelerationReserved

ftui-simd is Reserved. The crate exists as a workspace member but its public API is not yet settled. Treat any usage as experimental until it is marked Implemented.

Adjacent crates — NOT in this workspace

The following crates appear in some FrankenTerm-related specs and integration docs, but are not vendored in this workspace:

CrateStatus in this workspaceWhere it actually lives
frankenterm-coreNot vendoredExternal dependency (used by ftui-pty via an external crate reference)
frankenterm-webNot vendoredAdjacent project — the browser-facing FrankenTermWeb bundle

Treat frankenterm-core and frankenterm-web as adjacent / external. The in-tree browser surface is ftui-web + ftui-showcase-wasm. If you see docs referring to crates/frankenterm-core in this repo, those references are historical — the code does not live here.

Publishing status

Cratecrates.ioVersion policy
ftui-corePublishedTracking workspace
ftui-layoutPublishedTracking workspace
ftui-i18nPublishedTracking workspace
All other 17 cratesIn publish queuePending

Until the remaining crates reach crates.io, prefer workspace path dependencies for the full stack. See project setup for Cargo.toml patterns.

Release profile

The workspace release build optimizes for size:

# Cargo.toml (workspace root) [profile.release] opt-level = "z" # Optimize for size lto = true # Link-time optimization codegen-units = 1 # Better cross-module inlining panic = "abort" # Smaller binary, no unwinding overhead strip = true # Remove debug symbols # Exception: the VFX rasterizer benefits from SIMD, loop unrolling, # and aggressive inlining far more than from binary size. [profile.release.package.ftui-extras] opt-level = 3

Do not change opt-level = 3 for ftui-extras. The VFX rasterizer inner loops are written assuming autovectorization and aggressive inlining; opt-level = "z" loses roughly an order of magnitude on per-frame cost. See design decisions.

Key files per crate

This is a quick “where is X implemented” map for the hottest files:

CrateKey fileWhat’s in it
doctor_frankentuisrc/doctor.rsVerification harness orchestration
doctor_frankentuisrc/intent_inference.rsIntent inference engine
doctor_frankentuisrc/semantic_contract.rsSemantic contracts and assertions
ftui-a11ysrc/node.rsAccessibility node types, roles, states
ftui-a11ysrc/tree.rsAccessibility tree builder + diff
ftui-coresrc/terminal_session.rsRAII terminal lifecycle
ftui-rendersrc/buffer.rs2D cell buffer with scissor stacks
ftui-rendersrc/cell.rs16-byte cache-optimized Cell
ftui-rendersrc/diff.rsEfficient buffer diff computation
ftui-rendersrc/presenter.rsState-tracked ANSI emitter
ftui-runtimesrc/program.rsMain event loop (13K+ lines)
ftui-runtimesrc/terminal_writer.rsOne-writer rule enforcement
ftui-layoutsrc/pane.rsPane workspace system (9K+ lines)
ftui-layoutsrc/egraph.rsE-graph layout optimizer
ftui-widgetssrc/lib.rsWidget traits + core library
ftui-demo-showcasesrc/app.rsDemo application model

Pitfalls

Don’t add a new top-level crate unless it can’t reasonably live in an existing one. The bar is incredibly high. Look at the 20 existing crates and find the right home first — see project philosophy and the “No File Proliferation” rule.

Don’t re-introduce references to crates/frankenterm-core or crates/frankenterm-web in this workspace. They are not here. If you see such a reference in a spec file, treat it as a doc bug.

Where next