Expand description
Dataflow graph intermediate representation for Algebraic TSX
This module provides the dataflow graph model that connects geometric state to DOM operations. Unlike virtual DOM, this represents a static graph of transformations that can be optimized at compile time.
§Key Concepts
- Node: A computation unit (source, transform, projection, sink)
- Edge: Data dependency between nodes
- Graph: The complete dataflow network
§Dataflow Semantics
GeometricState ──┬── Projection ──► DOM Text
│
├── Transform ───► Projection ──► DOM Style
│
└── Sink ────────► Event Handler§Example
use cliffy_core::dataflow::{DataflowGraph, Node, NodeKind};
let mut graph = DataflowGraph::new();
// Add a source node (geometric state)
let state_id = graph.add_node(Node::source("counter_state"));
// Add a projection to extract the count
let proj_id = graph.add_node(Node::projection("count_text", "scalar_to_string"));
// Connect source to projection
graph.connect(state_id, proj_id);
// Add a sink (DOM text content)
let sink_id = graph.add_node(Node::sink("span_text", "textContent"));
graph.connect(proj_id, sink_id);Structs§
- Dataflow
Graph - A dataflow graph representing the transformation pipeline.
- Graph
Builder - Builder for constructing dataflow graphs fluently.
- Node
- A node in the dataflow graph.
- Projection
Spec - Specification for a projection node.
- Sink
Spec - Specification for a sink node.
Enums§
- Combiner
Type - Type of combiner for multiple inputs.
- Node
Kind - The kind of computation a node performs.
- Rotation
Plane - Plane of rotation in 3D.
- Transform
Type - Type of geometric transformation.
Type Aliases§
- NodeId
- A unique identifier for a node in the dataflow graph.