Same three-node pipeline as rust-dataflow, but launched programmatically via dora_cli::build() and dora_cli::run() in run.rs instead of the CLI.
timer (10ms) --> rust-node --> random --> rust-status-node --> status --> rust-sink
timer (100ms) -->
rust-node -- Generates random values on each 10ms timer tick.
rust-status-node -- Combines random input with its own 100ms timer to produce status messages.
rust-sink -- Consumes and prints status messages.
The run.rs harness calls dora CLI functions as a library:
use dora_cli::{BuildConfig, build, run};
fn main() -> eyre::Result<()> {
build(BuildConfig {
dataflow: "dataflow.yml".to_string(),
force_local: true,
..Default::default()
})?;
run("dataflow.yml".to_string(), false)?;
Ok(())
}This demonstrates embedding dora's build and run steps in a Rust program -- useful for testing, CI, or custom orchestration.
cargo run --example rust-dataflow-urlOr using the CLI directly:
dora build dataflow.yml
dora run dataflow.yml| Feature | Where |
|---|---|
dora_cli::build() programmatic API |
run.rs |
dora_cli::run() programmatic API |
run.rs |
build: commands in YAML |
YAML (all nodes) |
| Same topology, programmatic launch | vs rust-dataflow |