Skip to main content

ezu_graph/
lib.rs

1//! Typed DAG evaluator for the Ezu Style Spec.
2//!
3//! - [`port`] — `PortKind`, `PortSpec`, `CoordSpace`
4//! - [`buf`] / [`value`] — concrete buffers and the `PortValue` enum
5//! - [`node`] — the `Node` trait every operation implements
6//! - [`graph`] — `GraphBuilder` / `Graph` with topo sort, type checking,
7//!   cycle detection, and pad propagation
8//! - [`registry`] / [`build`] — turn a parsed `ezu_style::Document`
9//!   into a typed `Graph` using a registry of node factories
10//! - [`input`] — `In<T>` scalar fields: literal / `$param` / `@node` port
11//! - [`eval`] / [`cache`] / [`evaluator`] — render a tile
12
13pub mod buf;
14pub mod build;
15pub mod cache;
16pub mod eval;
17pub mod evaluator;
18pub mod graph;
19pub mod input;
20pub mod neighbor;
21pub mod node;
22pub mod port;
23pub mod registry;
24pub mod value;
25
26pub use buf::{GeoScale, OpaqueValue, RasterBuf, ScalarField, SpriteRect, SpriteSheet};
27pub use build::{build_graph, BuildGraphError};
28pub use cache::{Cache, CacheKey, Hash128};
29pub use eval::{
30    Asset, AssetError, AssetLoader, CanvasInfo, EvalCtx, EvalError, NoAssets, ParamValues, TileId,
31};
32pub use evaluator::{Evaluator, RenderError};
33pub use graph::{BuildError, Edge, Graph, GraphBuilder, NodeId, NodeIx, MAX_PAD};
34pub use input::{parse_param_value, In, InParts, InReader, ScalarType, ACCEPTS_SCALAR};
35pub use neighbor::{neighbor_binding, neighbor_bindings, parse_neighbor_binding};
36pub use node::Node;
37pub use port::{CoordSpace, PortKind, PortSpec};
38pub use registry::{
39    schema_frag, take_input_ref, take_optional_input_ref, BuiltNode, Connection, FactoryCtx,
40    FactoryError, NodeFactory, NodeRegistry, StaticOp,
41};
42
43#[doc(hidden)]
44pub use inventory;
45pub use value::{PortValue, ScalarValue};
46
47#[cfg(test)]
48mod tests;