rill_graph/lib.rs
1//! # Rill Graph — Static DAG Signal Graph
2//!
3//! This crate provides an immutable signal graph with static topology.
4//! Build once with `GraphBuilder`. The graph is a pure topology description
5//! — `build_ir()` produces a [`rill_lang::graph_ir::GraphIr`], which
6//! `rill-lang`'s [`rill_lang::graph_compiler::compile`] transforms into a
7//! [`rill_lang::graph_engine::CompiledGraphEngine`] for execution.
8//!
9//! ## Key Features
10//!
11//! - **Static DAG topology** — connections are fixed after build
12//! - **Kahn's algorithm** — automatic topological sort with cycle detection
13//! - **Auto FanOut/FanIn** — connections classified by topology (user never chooses)
14//! - **GraphIr** — intermediate representation for rill-lang compilation
15
16#![warn(missing_docs)]
17#![deny(unsafe_code)]
18
19mod graph;
20
21/// Backend factory for constructing I/O backends by name.
22pub mod backend_factory;
23
24/// Graph serialization (JSON / CBOR). Feature-gated behind `serialization`.
25#[cfg(feature = "serialization")]
26pub mod serialization;
27
28pub use graph::{BuildError, GraphBuilder, GraphResource};
29
30/// Prelude for convenient imports
31pub mod prelude {
32 pub use crate::GraphBuilder;
33 pub use rill_core::prelude::*;
34}