Skip to Content
APIansiq-core

ansiq-core

ansiq-core owns the model layer:

  • Element
  • signals and reactive runtime
  • style and color types
  • history and transcript data
  • widget state types

Its role can be summarized in one sentence:

define the shared language of the framework, but do not update the terminal directly.

What you usually find here

Reactive primitives

  • signal
  • computed
  • effect

This is the layer most apps touch first.

let query = cx.signal(String::new); let is_empty = cx.computed({ let query = query.clone(); move || query.get().trim().is_empty() });

If your current question is mostly about these boundaries, start with:

Shared data models

ansiq-core also owns structures that move across crates, including:

  • Element
  • Color / Style
  • HistoryBlock
  • TranscriptEntry
  • ListState / TableState / ScrollbarState

These matter because:

  • widgets build props around them
  • runtime uses them for continuity and routing
  • surface uses them for history and viewport semantics

Core contracts

Some pure protocols now live here too, for example:

  • runtime state continuity
  • widget key routing
  • pure layout / render-math helpers

That is why ansiq-core is more than “the reactivity crate”. It is the shared contract layer.

When to read it first

Start here when:

  • you want the real boundary of signal / computed / effect
  • you want to understand why a State type looks the way it does
  • you are debugging continuity, history, or style across layers
  • you are contributing to runtime, widgets, or surface

When not to start here

If your question is:

  • “how do I run an app?”
  • “what can RuntimeHandle do?”
  • “which viewport policy should I use?”

start with:

  1. Signals and Hooks
  2. ansiq-runtime
  3. Reactive System in Depth
Last updated on