rill-graph
Static DAG signal graph builder and serializable graph format.
Processing is driven by rill-lang's CompiledGraphEngine — this crate
provides topology description only, not an execution engine.
Key components
GraphBuilder<T, BUF_SIZE>— mutable builder:add_node(),connect_signal/control/clock/feedback(),add_resource(),build_ir()GraphResource— named shared resource (tape loop, buffer) referenced by node parametersBuildError— error type for graph construction (cycle detection, unknown node types)GraphDef/NodeDef— serializable graph topology (JSON/CBOR, behindserializationfeature)build_ir(registry)— producesrill_lang::graph_ir::GraphIr, compiled bygraph_compiler::compile()intoCompiledGraphEngine
Public API
use GraphBuilder;
const BUF_SIZE: usize = 256;
let mut builder: = new;
// Add nodes by type name
let osc = builder.add_node;
let lpf = builder.add_node_with_name;
let out = builder.add_node;
// Wire connections
builder.connect_signal;
builder.connect_signal;
// Compile via rill-lang
let engine = builder.build_ir?;
Hard-RT safe
rill-graph itself performs no heap allocation or syscalls — it's a pure
builder and topology description. The runtime execution (shared FixedBuffer
pool, flat NodeClosure vector) runs in rill-lang's CompiledGraphEngine
with zero allocation on the signal path.
Debug infrastructure (debug feature)
build_ir()automatically insertsProbePointIR instructions at each node's output, enabling signal-level inspection viarill-analyzer- Compiles graph nodes to complete
rill_lang::Irwith builtins, params, and instructions — mirrors the rill-lang DSL compilation path
Dependencies
rill-core—Registry,BuiltinSig,Paramsrill-lang—GraphIr,graph_compiler::compile(),CompiledGraphEngine
Links
- Repository: https://github.com/DigitalRats/rill
- Documentation: https://docs.rs/rill-graph