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//! — processing is driven by port-level methods (`pre_process`,
6//! `snapshot_feedback`, `propagate`) called from external code.
7//!
8//! ## Key Features
9//!
10//! - **Static DAG topology** — connections are fixed after build
11//! - **Kahn's algorithm** — automatic topological sort with cycle detection
12//! - **Auto FanOut/FanIn** — connections classified by topology (user never chooses)
13//! - **Port-owned routing** — downstream connections and feedback state live on ports
14//! - **Copy-based buffer routing** — separate input/output buffer pools (zero-copy planned)
15//! - **Safe Rust** — no `unsafe` code
16
17#![warn(missing_docs)]
18#![deny(unsafe_code)]
19
20mod graph;
21
22/// Backend factory for constructing audio I/O backends by name.
23pub mod backend_factory;
24
25/// Node factory and registry for constructing nodes by type name.
26pub mod factory;
27
28/// ActiveNode trait — nodes that drive graph processing.
29pub mod active;
30
31/// Graph serialization (JSON / CBOR). Feature-gated behind `serialization`.
32#[cfg(feature = "serialization")]
33pub mod serialization;
34
35/// DOT graph visualization (Graphviz). Feature-gated behind `dot`.
36#[cfg(feature = "dot")]
37pub mod dot;
38
39pub use factory::{NodeConstructor, NodeFactory, RegistryError};
40pub use graph::{BuildError, Graph, GraphBuilder, GraphResource};
41
42/// Prelude for convenient imports
43pub mod prelude {
44 pub use crate::{Graph, GraphBuilder, NodeConstructor, NodeFactory, RegistryError};
45 pub use rill_core::prelude::*;
46}