You can not select more than 25 topics Topics must start with a chinese character,a letter or number, can include dashes ('-') and can be up to 35 characters long.

123456789101112131415161718192021222324252627282930313233
  1. use eyre::{bail, Context};
  2. use std::path::Path;
  3. #[tokio::main]
  4. async fn main() -> eyre::Result<()> {
  5. let root = Path::new(env!("CARGO_MANIFEST_DIR"));
  6. std::env::set_current_dir(root.join(file!()).parent().unwrap())
  7. .wrap_err("failed to set working dir")?;
  8. build_package("rust-dataflow-example-node").await?;
  9. build_package("rust-dataflow-example-operator").await?;
  10. build_package("rust-dataflow-example-sink").await?;
  11. build_package("dora-runtime").await?;
  12. dora_coordinator::run(dora_coordinator::Command::Run {
  13. dataflow: Path::new("dataflow.yml").to_owned(),
  14. runtime: Some(root.join("target").join("release").join("dora-runtime")),
  15. })
  16. .await?;
  17. Ok(())
  18. }
  19. async fn build_package(package: &str) -> eyre::Result<()> {
  20. let cargo = std::env::var("CARGO").unwrap();
  21. let mut cmd = tokio::process::Command::new(&cargo);
  22. cmd.arg("build").arg("--release");
  23. cmd.arg("--package").arg(package);
  24. if !cmd.status().await?.success() {
  25. bail!("failed to build {package}");
  26. };
  27. Ok(())
  28. }

DORA (Dataflow-Oriented Robotic Architecture) is middleware designed to streamline and simplify the creation of AI-based robotic applications. It offers low latency, composable, and distributed datafl