astrs-graph
Dataflow graph model, edge type checking, placement planning and visualization for AstRS.
What a validated manifest becomes before anything is spawned: the graph
model (nodes, ports, edges, virtual sources and modules — see
DataflowGraph::from_manifest), edge type checking against declared type
URNs with type: any as an explicit opt-out rather than a silent default,
stable topological metadata (strongly-connected-component/cycle detection
and service/action pattern pairing), a placement planner mapping nodes onto
daemons and deciding which edges are same-host versus cross-host,
visualization to mermaid and DOT for astrs graph, and graph diffing for
dynamic topology changes (astrs node add/remove). This crate builds its
graph from whatever expanded manifest shape astrs-manifest hands it;
module expansion itself is that crate's responsibility.
Example
use DataflowGraph;
use Manifest;
let yaml = "\
nodes:
- id: camera
path: ./camera
outputs: [frames]
- id: detector
path: ./detector
inputs:
frames: camera/frames
";
let manifest = from_yaml_str?;
manifest.validate?;
let = from_manifest?;
assert!;
assert_eq!;
assert_eq!;
assert!; // no type mismatches, cycles, ...
# Ok::
See the workspace README for the manifest this crate's graph is built from.
License
Apache-2.0, part of the AstRS
workspace. See
NOTICE.md for
third-party attribution.