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//! - [`mem`] — opt-in accounting of live intermediate pixel buffers
13
14pub mod buf;
15pub mod build;
16pub mod cache;
17pub mod eval;
18pub mod evaluator;
19pub mod graph;
20pub mod input;
21pub mod mem;
22pub mod neighbor;
23pub mod node;
24pub mod port;
25pub mod registry;
26pub mod value;
27
28pub use buf::{GeoScale, OpaqueValue, RasterBuf, ScalarField, SpriteRect, SpriteSheet};
29pub use build::{build_graph, BuildGraphError};
30pub use cache::{Cache, CacheKey, Hash128};
31pub use eval::{
32    Asset, AssetError, AssetLoader, CanvasInfo, EvalCtx, EvalError, NoAssets, ParamValues, TileId,
33};
34pub use evaluator::{Evaluator, RenderError};
35pub use graph::{BuildError, Edge, Graph, GraphBuilder, NodeId, NodeIx, MAX_PAD};
36pub use input::{parse_param_value, In, InParts, InReader, ScalarType, ACCEPTS_SCALAR};
37pub use neighbor::{neighbor_binding, neighbor_bindings, parse_neighbor_binding};
38pub use node::Node;
39pub use port::{CoordSpace, PortKind, PortSpec};
40pub use registry::{
41    schema_frag, take_input_ref, take_optional_input_ref, BuiltNode, Connection, FactoryCtx,
42    FactoryError, NodeFactory, NodeRegistry, StaticOp,
43};
44
45#[doc(hidden)]
46pub use inventory;
47pub use value::{PortValue, ScalarValue};
48
49#[cfg(test)]
50mod tests;