From e9f3980b63180d48aa5383376deb4a164e551abc Mon Sep 17 00:00:00 2001 From: jbernavaprah Date: Mon, 8 Jun 2026 22:39:33 +0200 Subject: [PATCH 1/2] refactor: depend on single `phoxal` crate Replace the per-crate framework deps with one `phoxal` dependency and move imports to phoxal::{bus,model,spatial,api,runtime}. Flip the catalog driver crates onto the single phoxal dep. Cargo.lock regenerates once framework's `phoxal` is pushed; local builds use an uncommitted .cargo/config.toml patch overlay. Co-Authored-By: Claude Opus 4.8 Signed-off-by: jbernavaprah --- Cargo.toml | 17 +---------------- bno085/Cargo.toml | 6 +----- bno085/src/main.rs | 4 ++-- bno085/src/runtime.rs | 28 ++++++++++++++-------------- ddsm115/Cargo.toml | 6 +----- ddsm115/src/main.rs | 4 ++-- ddsm115/src/runtime.rs | 20 ++++++++++---------- oak_d_lite/Cargo.toml | 3 +-- oak_d_lite/src/main.rs | 4 ++-- vl53l1x/Cargo.toml | 6 +----- vl53l1x/src/main.rs | 4 ++-- vl53l1x/src/runtime.rs | 18 +++++++++--------- zed_f9p/Cargo.toml | 3 +-- zed_f9p/src/main.rs | 4 ++-- 14 files changed, 49 insertions(+), 78 deletions(-) diff --git a/Cargo.toml b/Cargo.toml index 2b54d3b..cd388c3 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,11 +22,7 @@ async-trait = "0.1.89" clap = { version = "4.6.1", features = ["derive"] } tokio = { version = "1", features = ["macros", "rt", "rt-multi-thread", "time", "signal", "sync", "fs"] } tracing = "0.1.44" -phoxal-infra-bus = { git = "https://github.com/phoxal/framework", branch = "main" } -phoxal-api-component = { git = "https://github.com/phoxal/framework", branch = "main" } -phoxal-core-engine = { git = "https://github.com/phoxal/framework", branch = "main" } -phoxal-core-component = { git = "https://github.com/phoxal/framework", branch = "main" } -phoxal-infra-helpers = { git = "https://github.com/phoxal/framework", branch = "main" } +phoxal = { git = "https://github.com/phoxal/framework", branch = "main" } [workspace.lints.rust] unused = "warn" @@ -34,14 +30,3 @@ unused = "warn" [profile.release] lto = false codegen-units = 16 - -# Patch the engine alias so a transitive git fetch lines up with the framework canonical source. -[patch."https://github.com/phoxal/engine"] -phoxal-infra-bus = { git = "https://github.com/phoxal/framework", branch = "main" } -phoxal-api-component = { git = "https://github.com/phoxal/framework", branch = "main" } -phoxal-core-engine = { git = "https://github.com/phoxal/framework", branch = "main" } -phoxal-core-component = { git = "https://github.com/phoxal/framework", branch = "main" } -phoxal-infra-helpers = { git = "https://github.com/phoxal/framework", branch = "main" } -phoxal-core-robot = { git = "https://github.com/phoxal/framework", branch = "main" } -phoxal-core-spatial = { git = "https://github.com/phoxal/framework", branch = "main" } -phoxal-core-structure = { git = "https://github.com/phoxal/framework", branch = "main" } diff --git a/bno085/Cargo.toml b/bno085/Cargo.toml index 7bfb652..aa0b9a0 100644 --- a/bno085/Cargo.toml +++ b/bno085/Cargo.toml @@ -19,8 +19,4 @@ async-trait = { workspace = true } clap = { workspace = true, features = ["derive", "env"] } tokio = { workspace = true, features = ["macros", "rt", "rt-multi-thread", "signal", "sync", "time"] } tracing = { workspace = true } -phoxal-core-engine = { workspace = true } -phoxal-infra-helpers = { workspace = true } -phoxal-core-component = { workspace = true } -phoxal-infra-bus = { workspace = true } -phoxal-api-component = { workspace = true } +phoxal = { workspace = true } diff --git a/bno085/src/main.rs b/bno085/src/main.rs index 50374b5..eb1c3b9 100644 --- a/bno085/src/main.rs +++ b/bno085/src/main.rs @@ -2,8 +2,8 @@ mod runtime; use anyhow::Result; use clap::Parser; -use phoxal_core_engine::{DriverRuntimeArgs, step::RuntimeProcess}; -use phoxal_infra_helpers::init_tracing; +use phoxal::runtime::{DriverRuntimeArgs, step::RuntimeProcess}; +use phoxal::util::init_tracing; use tracing::info; use crate::runtime::Config; diff --git a/bno085/src/runtime.rs b/bno085/src/runtime.rs index 76ac12b..a31aa61 100644 --- a/bno085/src/runtime.rs +++ b/bno085/src/runtime.rs @@ -1,16 +1,16 @@ use std::time::Duration; use anyhow::{Result, bail}; -use phoxal_api_component::v1::capability::accelerometer::Sample as AccelerometerSample; -use phoxal_api_component::v1::capability::gyroscope::Sample as GyroscopeSample; -use phoxal_api_component::v1::capability::imu; -use phoxal_api_component::v1::capability::imu::Sample as ImuSample; -use phoxal_core_component::v1::CapabilityRef; -use phoxal_core_component::v1::capability::Capability; -use phoxal_core_engine::clock::{Schedule, SchedulePolicy, Step}; -use phoxal_core_engine::step::{Io, Publisher, Runtime, RuntimeInputs}; -use phoxal_core_engine::{EmptyArgs, RobotRuntimeArgs}; -use phoxal_infra_bus::pubsub::Stamped; +use phoxal::api::component::v1::capability::accelerometer::Sample as AccelerometerSample; +use phoxal::api::component::v1::capability::gyroscope::Sample as GyroscopeSample; +use phoxal::api::component::v1::capability::imu; +use phoxal::api::component::v1::capability::imu::Sample as ImuSample; +use phoxal::bus::pubsub::Stamped; +use phoxal::model::component::v1::CapabilityRef; +use phoxal::model::component::v1::capability::Capability; +use phoxal::runtime::clock::{Schedule, SchedulePolicy, Step}; +use phoxal::runtime::step::{Io, Publisher, Runtime, RuntimeInputs}; +use phoxal::runtime::{EmptyArgs, RobotRuntimeArgs}; #[derive(Clone)] pub struct Config { @@ -22,7 +22,7 @@ pub struct Config { impl Config { pub fn new( component_id: &str, - component: &phoxal_core_component::v1::Component, + component: &phoxal::model::component::v1::Component, ) -> Result { Ok(Self { imu: sensor(component_id, component, CapabilityKind::Imu)?, @@ -50,7 +50,7 @@ enum CapabilityKind { fn sensor( component_id: &str, - component: &phoxal_core_component::v1::Component, + component: &phoxal::model::component::v1::Component, kind: CapabilityKind, ) -> Result { let mut sensor = None; @@ -168,7 +168,7 @@ impl Runtime for Bno085Runtime { .await?; let accelerometer_pub = io .publisher::>( - &phoxal_api_component::v1::capability::default_profile_path( + &phoxal::api::component::v1::capability::default_profile_path( &config.accelerometer.capability.component_id, &config.accelerometer.capability.capability_id, ), @@ -176,7 +176,7 @@ impl Runtime for Bno085Runtime { .await?; let gyroscope_pub = io .publisher::>( - &phoxal_api_component::v1::capability::default_profile_path( + &phoxal::api::component::v1::capability::default_profile_path( &config.gyroscope.capability.component_id, &config.gyroscope.capability.capability_id, ), diff --git a/ddsm115/Cargo.toml b/ddsm115/Cargo.toml index 9c0f41b..bf8b3d3 100644 --- a/ddsm115/Cargo.toml +++ b/ddsm115/Cargo.toml @@ -19,8 +19,4 @@ async-trait = { workspace = true } clap = { workspace = true, features = ["derive", "env"] } tokio = { workspace = true, features = ["macros", "rt", "rt-multi-thread", "signal", "sync", "time"] } tracing = { workspace = true } -phoxal-core-engine = { workspace = true } -phoxal-infra-helpers = { workspace = true } -phoxal-core-component = { workspace = true } -phoxal-infra-bus = { workspace = true } -phoxal-api-component = { workspace = true } +phoxal = { workspace = true } diff --git a/ddsm115/src/main.rs b/ddsm115/src/main.rs index 6932c6f..e19c6f1 100644 --- a/ddsm115/src/main.rs +++ b/ddsm115/src/main.rs @@ -2,8 +2,8 @@ mod runtime; use anyhow::Result; use clap::Parser; -use phoxal_core_engine::{DriverRuntimeArgs, step::RuntimeProcess}; -use phoxal_infra_helpers::init_tracing; +use phoxal::runtime::{DriverRuntimeArgs, step::RuntimeProcess}; +use phoxal::util::init_tracing; use tracing::info; use crate::runtime::Config; diff --git a/ddsm115/src/runtime.rs b/ddsm115/src/runtime.rs index 97fe8c9..0b6964e 100644 --- a/ddsm115/src/runtime.rs +++ b/ddsm115/src/runtime.rs @@ -1,15 +1,15 @@ use std::time::Duration; use anyhow::{Result, bail}; -use phoxal_api_component::v1::capability::encoder::Sample; -use phoxal_api_component::v1::capability::motor::Command; -use phoxal_api_component::v1::capability::{encoder, motor}; -use phoxal_core_component::v1::CapabilityRef; -use phoxal_core_component::v1::capability::{Capability, MotorCommand}; -use phoxal_core_engine::clock::{Schedule, SchedulePolicy, Step}; -use phoxal_core_engine::step::{Io, Publisher, Runtime, RuntimeInputs}; -use phoxal_core_engine::{EmptyArgs, RobotRuntimeArgs}; -use phoxal_infra_bus::pubsub::Stamped; +use phoxal::api::component::v1::capability::encoder::Sample; +use phoxal::api::component::v1::capability::motor::Command; +use phoxal::api::component::v1::capability::{encoder, motor}; +use phoxal::bus::pubsub::Stamped; +use phoxal::model::component::v1::CapabilityRef; +use phoxal::model::component::v1::capability::{Capability, MotorCommand}; +use phoxal::runtime::clock::{Schedule, SchedulePolicy, Step}; +use phoxal::runtime::step::{Io, Publisher, Runtime, RuntimeInputs}; +use phoxal::runtime::{EmptyArgs, RobotRuntimeArgs}; use tracing::info; #[derive(Clone)] @@ -22,7 +22,7 @@ pub struct Config { impl Config { pub fn new( component_id: &str, - component: &phoxal_core_component::v1::Component, + component: &phoxal::model::component::v1::Component, ) -> Result { let mut actuator_id = None; let mut actuator_type = None; diff --git a/oak_d_lite/Cargo.toml b/oak_d_lite/Cargo.toml index a1291e7..3003de2 100644 --- a/oak_d_lite/Cargo.toml +++ b/oak_d_lite/Cargo.toml @@ -18,5 +18,4 @@ anyhow = { workspace = true } clap = { workspace = true, features = ["derive", "env"] } tokio = { workspace = true, features = ["macros", "rt", "rt-multi-thread"] } tracing = { workspace = true } -phoxal-core-engine = { workspace = true } -phoxal-infra-helpers = { workspace = true } +phoxal = { workspace = true } diff --git a/oak_d_lite/src/main.rs b/oak_d_lite/src/main.rs index 58d6c8a..1ebdbf5 100644 --- a/oak_d_lite/src/main.rs +++ b/oak_d_lite/src/main.rs @@ -1,7 +1,7 @@ use anyhow::{Result, bail}; use clap::Parser; -use phoxal_core_engine::DriverRuntimeArgs; -use phoxal_infra_helpers::init_tracing; +use phoxal::runtime::DriverRuntimeArgs; +use phoxal::util::init_tracing; use tracing::error; #[tokio::main] diff --git a/vl53l1x/Cargo.toml b/vl53l1x/Cargo.toml index cd084b9..4291363 100644 --- a/vl53l1x/Cargo.toml +++ b/vl53l1x/Cargo.toml @@ -19,8 +19,4 @@ async-trait = { workspace = true } clap = { workspace = true, features = ["derive", "env"] } tokio = { workspace = true, features = ["macros", "rt", "rt-multi-thread", "signal", "sync", "time"] } tracing = { workspace = true } -phoxal-core-engine = { workspace = true } -phoxal-infra-helpers = { workspace = true } -phoxal-core-component = { workspace = true } -phoxal-infra-bus = { workspace = true } -phoxal-api-component = { workspace = true } +phoxal = { workspace = true } diff --git a/vl53l1x/src/main.rs b/vl53l1x/src/main.rs index ead3bf8..51d5483 100644 --- a/vl53l1x/src/main.rs +++ b/vl53l1x/src/main.rs @@ -2,8 +2,8 @@ mod runtime; use anyhow::Result; use clap::Parser; -use phoxal_core_engine::{DriverRuntimeArgs, step::RuntimeProcess}; -use phoxal_infra_helpers::init_tracing; +use phoxal::runtime::{DriverRuntimeArgs, step::RuntimeProcess}; +use phoxal::util::init_tracing; use tracing::info; use crate::runtime::Config; diff --git a/vl53l1x/src/runtime.rs b/vl53l1x/src/runtime.rs index a1aa8d6..9a04b72 100644 --- a/vl53l1x/src/runtime.rs +++ b/vl53l1x/src/runtime.rs @@ -1,11 +1,11 @@ use anyhow::{Result, bail}; -use phoxal_api_component::v1::capability::range::{self, Sample}; -use phoxal_core_component::v1::CapabilityRef; -use phoxal_core_component::v1::capability::{Capability, Range as RangeConfig}; -use phoxal_core_engine::clock::{Schedule, SchedulePolicy, Step}; -use phoxal_core_engine::step::{Io, Publisher, Runtime, RuntimeInputs}; -use phoxal_core_engine::{EmptyArgs, RobotRuntimeArgs}; -use phoxal_infra_bus::pubsub::Stamped; +use phoxal::api::component::v1::capability::range::{self, Sample}; +use phoxal::bus::pubsub::Stamped; +use phoxal::model::component::v1::CapabilityRef; +use phoxal::model::component::v1::capability::{Capability, Range as RangeConfig}; +use phoxal::runtime::clock::{Schedule, SchedulePolicy, Step}; +use phoxal::runtime::step::{Io, Publisher, Runtime, RuntimeInputs}; +use phoxal::runtime::{EmptyArgs, RobotRuntimeArgs}; #[derive(Clone)] pub struct Config { @@ -15,7 +15,7 @@ pub struct Config { impl Config { pub fn new( component_id: &str, - component: &phoxal_core_component::v1::Component, + component: &phoxal::model::component::v1::Component, ) -> Result { Ok(Self { range: Self::inspect(component_id, component)?, @@ -24,7 +24,7 @@ impl Config { fn inspect( component_id: &str, - component: &phoxal_core_component::v1::Component, + component: &phoxal::model::component::v1::Component, ) -> Result { let mut range = None; diff --git a/zed_f9p/Cargo.toml b/zed_f9p/Cargo.toml index 8d3185a..dee36e1 100644 --- a/zed_f9p/Cargo.toml +++ b/zed_f9p/Cargo.toml @@ -18,5 +18,4 @@ anyhow = { workspace = true } clap = { workspace = true, features = ["derive", "env"] } tokio = { workspace = true, features = ["macros", "rt", "rt-multi-thread"] } tracing = { workspace = true } -phoxal-core-engine = { workspace = true } -phoxal-infra-helpers = { workspace = true } +phoxal = { workspace = true } diff --git a/zed_f9p/src/main.rs b/zed_f9p/src/main.rs index 6cb63b9..fb23264 100644 --- a/zed_f9p/src/main.rs +++ b/zed_f9p/src/main.rs @@ -1,7 +1,7 @@ use anyhow::{Result, bail}; use clap::Parser; -use phoxal_core_engine::DriverRuntimeArgs; -use phoxal_infra_helpers::init_tracing; +use phoxal::runtime::DriverRuntimeArgs; +use phoxal::util::init_tracing; use tracing::error; #[tokio::main] From 1706e8623a0e088f36db071fc344ea33f0cf0f1b Mon Sep 17 00:00:00 2001 From: jbernavaprah Date: Tue, 9 Jun 2026 21:19:46 +0200 Subject: [PATCH 2/2] build(deps): track phoxal 0.4.0 from crates.io Move from the `git branch=main` framework dep to the published `phoxal = "0.4.0"` and update for the post-#51 API: runtime::step->runtime, bus::zenoh_typed->zenoh, api leaf ::TOPIC->::path(), staged::Robot->model::v1::Robot, the #49 mission contract. Drops the local .cargo overlay; Cargo.lock now resolves phoxal from crates.io. Verified: cargo clippy --workspace --all-targets -- -D warnings + test green against the published crate. Co-Authored-By: Claude Opus 4.8 Signed-off-by: jbernavaprah --- Cargo.lock | 179 ++++++++++------------------------------- Cargo.toml | 2 +- bno085/src/main.rs | 2 +- bno085/src/runtime.rs | 5 +- ddsm115/src/main.rs | 2 +- ddsm115/src/runtime.rs | 7 +- vl53l1x/src/main.rs | 2 +- vl53l1x/src/runtime.rs | 5 +- 8 files changed, 52 insertions(+), 152 deletions(-) diff --git a/Cargo.lock b/Cargo.lock index 8efc52f..32d8163 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -1924,185 +1924,88 @@ dependencies = [ ] [[package]] -name = "phoxal-api-component" -version = "0.3.0" -source = "git+https://github.com/phoxal/framework?branch=main#8f641f616e1dd252df3a75717b1e483ee7446a10" +name = "phoxal" +version = "0.4.0" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "069b276097c1231660a800e2fc27719cf4cc9d42e0f8928589d96da8db877847" dependencies = [ + "anyhow", + "arc-swap", + "async-trait", + "clap", "derive-new", - "phoxal-infra-bus", + "derive_setters", + "dotenvy", + "nalgebra", + "rmp-serde", "serde", "serde_bytes", + "serde_json", + "serde_yaml", + "thiserror 2.0.18", + "tokio", + "tracing", + "tracing-subscriber", + "urdf-rs", + "zenoh", ] [[package]] name = "phoxal-component-bno085" -version = "0.3.0" +version = "0.1.0" dependencies = [ "anyhow", "async-trait", "clap", - "phoxal-api-component", - "phoxal-core-component", - "phoxal-core-engine", - "phoxal-infra-bus", - "phoxal-infra-helpers", + "phoxal", "tokio", "tracing", ] [[package]] name = "phoxal-component-ddsm115" -version = "0.3.0" +version = "0.1.0" dependencies = [ "anyhow", "async-trait", "clap", - "phoxal-api-component", - "phoxal-core-component", - "phoxal-core-engine", - "phoxal-infra-bus", - "phoxal-infra-helpers", + "phoxal", "tokio", "tracing", ] [[package]] name = "phoxal-component-oak_d_lite" -version = "0.3.0" +version = "0.1.0" dependencies = [ "anyhow", "clap", - "phoxal-core-engine", - "phoxal-infra-helpers", + "phoxal", "tokio", "tracing", ] [[package]] name = "phoxal-component-vl53l1x" -version = "0.3.0" +version = "0.1.0" dependencies = [ "anyhow", "async-trait", "clap", - "phoxal-api-component", - "phoxal-core-component", - "phoxal-core-engine", - "phoxal-infra-bus", - "phoxal-infra-helpers", + "phoxal", "tokio", "tracing", ] [[package]] name = "phoxal-component-zed_f9p" -version = "0.3.0" -dependencies = [ - "anyhow", - "clap", - "phoxal-core-engine", - "phoxal-infra-helpers", - "tokio", - "tracing", -] - -[[package]] -name = "phoxal-core-component" -version = "0.3.0" -source = "git+https://github.com/phoxal/framework?branch=main#8f641f616e1dd252df3a75717b1e483ee7446a10" -dependencies = [ - "anyhow", - "derive-new", - "serde", - "serde_yaml", -] - -[[package]] -name = "phoxal-core-engine" -version = "0.3.0" -source = "git+https://github.com/phoxal/framework?branch=main#8f641f616e1dd252df3a75717b1e483ee7446a10" +version = "0.1.0" dependencies = [ "anyhow", - "arc-swap", - "async-trait", "clap", - "dotenvy", - "phoxal-api-component", - "phoxal-core-component", - "phoxal-core-robot", - "phoxal-core-spatial", - "phoxal-core-structure", - "phoxal-infra-bus", - "phoxal-infra-helpers", - "serde", - "serde_json", - "tokio", - "tracing", - "urdf-rs", -] - -[[package]] -name = "phoxal-core-robot" -version = "0.3.0" -source = "git+https://github.com/phoxal/framework?branch=main#8f641f616e1dd252df3a75717b1e483ee7446a10" -dependencies = [ - "anyhow", - "nalgebra", - "phoxal-core-component", - "serde", - "serde_yaml", - "urdf-rs", -] - -[[package]] -name = "phoxal-core-spatial" -version = "0.3.0" -source = "git+https://github.com/phoxal/framework?branch=main#8f641f616e1dd252df3a75717b1e483ee7446a10" -dependencies = [ - "anyhow", - "nalgebra", - "phoxal-api-component", - "phoxal-core-component", - "phoxal-core-robot", - "phoxal-core-structure", - "serde", - "urdf-rs", -] - -[[package]] -name = "phoxal-core-structure" -version = "0.3.0" -source = "git+https://github.com/phoxal/framework?branch=main#8f641f616e1dd252df3a75717b1e483ee7446a10" -dependencies = [ - "anyhow", - "derive-new", - "serde", - "urdf-rs", -] - -[[package]] -name = "phoxal-infra-bus" -version = "0.3.0" -source = "git+https://github.com/phoxal/framework?branch=main#8f641f616e1dd252df3a75717b1e483ee7446a10" -dependencies = [ - "derive-new", - "derive_setters", - "rmp-serde", - "serde", - "serde_json", - "thiserror 2.0.18", + "phoxal", "tokio", "tracing", - "zenoh", -] - -[[package]] -name = "phoxal-infra-helpers" -version = "0.3.0" -source = "git+https://github.com/phoxal/framework?branch=main#8f641f616e1dd252df3a75717b1e483ee7446a10" -dependencies = [ - "anyhow", - "tracing-subscriber", ] [[package]] @@ -2567,9 +2470,9 @@ dependencies = [ [[package]] name = "rustls-native-certs" -version = "0.8.4" +version = "0.8.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "dab5152771c58876a2146916e53e35057e1a4dfa2b9df0f0305b07f611fdea4d" +checksum = "612460d5f7bea540c490b2b6395d8e34a953e52b491accd6c86c8164c5932a63" dependencies = [ "openssl-probe", "rustls-pki-types", @@ -3639,11 +3542,11 @@ checksum = "ccf3ec651a847eb01de73ccad15eb7d99f80485de043efb2f370cd654f4ea44b" [[package]] name = "wasip2" -version = "1.0.1+wasi-0.2.4" +version = "1.0.3+wasi-0.2.9" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "0562428422c63773dad2c345a1882263bbf4d65cf3f42e90921f787ef5ad58e7" +checksum = "20064672db26d7cdc89c7798c48a0fdfac8213434a1186e5ef29fd560ae223d6" dependencies = [ - "wit-bindgen 0.46.0", + "wit-bindgen 0.57.1", ] [[package]] @@ -4102,12 +4005,6 @@ dependencies = [ "memchr", ] -[[package]] -name = "wit-bindgen" -version = "0.46.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f17a85883d4e6d00e8a97c586de764dabcc06133f7f1d55dce5cdc070ad7fe59" - [[package]] name = "wit-bindgen" version = "0.51.0" @@ -4117,6 +4014,12 @@ dependencies = [ "wit-bindgen-rust-macro", ] +[[package]] +name = "wit-bindgen" +version = "0.57.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "1ebf944e87a7c253233ad6766e082e3cd714b5d03812acc24c318f549614536e" + [[package]] name = "wit-bindgen-core" version = "0.51.0" diff --git a/Cargo.toml b/Cargo.toml index cd388c3..1dcc16b 100644 --- a/Cargo.toml +++ b/Cargo.toml @@ -22,7 +22,7 @@ async-trait = "0.1.89" clap = { version = "4.6.1", features = ["derive"] } tokio = { version = "1", features = ["macros", "rt", "rt-multi-thread", "time", "signal", "sync", "fs"] } tracing = "0.1.44" -phoxal = { git = "https://github.com/phoxal/framework", branch = "main" } +phoxal = { version = "0.4.0" } [workspace.lints.rust] unused = "warn" diff --git a/bno085/src/main.rs b/bno085/src/main.rs index eb1c3b9..fbbed7c 100644 --- a/bno085/src/main.rs +++ b/bno085/src/main.rs @@ -2,7 +2,7 @@ mod runtime; use anyhow::Result; use clap::Parser; -use phoxal::runtime::{DriverRuntimeArgs, step::RuntimeProcess}; +use phoxal::runtime::{DriverRuntimeArgs, RuntimeProcess}; use phoxal::util::init_tracing; use tracing::info; diff --git a/bno085/src/runtime.rs b/bno085/src/runtime.rs index a31aa61..7ae2dc1 100644 --- a/bno085/src/runtime.rs +++ b/bno085/src/runtime.rs @@ -9,8 +9,7 @@ use phoxal::bus::pubsub::Stamped; use phoxal::model::component::v1::CapabilityRef; use phoxal::model::component::v1::capability::Capability; use phoxal::runtime::clock::{Schedule, SchedulePolicy, Step}; -use phoxal::runtime::step::{Io, Publisher, Runtime, RuntimeInputs}; -use phoxal::runtime::{EmptyArgs, RobotRuntimeArgs}; +use phoxal::runtime::{EmptyArgs, Io, Publisher, RobotRuntimeArgs, Runtime, RuntimeInputs}; #[derive(Clone)] pub struct Config { @@ -161,7 +160,7 @@ impl Runtime for Bno085Runtime { async fn new(io: &mut Io, config: Self::Config) -> Result { let imu_pub = io - .publisher::>(&imu::topic( + .publisher::>(&imu::path( &config.imu.capability.component_id, &config.imu.capability.capability_id, )) diff --git a/ddsm115/src/main.rs b/ddsm115/src/main.rs index e19c6f1..8ab1cac 100644 --- a/ddsm115/src/main.rs +++ b/ddsm115/src/main.rs @@ -2,7 +2,7 @@ mod runtime; use anyhow::Result; use clap::Parser; -use phoxal::runtime::{DriverRuntimeArgs, step::RuntimeProcess}; +use phoxal::runtime::{DriverRuntimeArgs, RuntimeProcess}; use phoxal::util::init_tracing; use tracing::info; diff --git a/ddsm115/src/runtime.rs b/ddsm115/src/runtime.rs index 0b6964e..5e9271f 100644 --- a/ddsm115/src/runtime.rs +++ b/ddsm115/src/runtime.rs @@ -8,8 +8,7 @@ use phoxal::bus::pubsub::Stamped; use phoxal::model::component::v1::CapabilityRef; use phoxal::model::component::v1::capability::{Capability, MotorCommand}; use phoxal::runtime::clock::{Schedule, SchedulePolicy, Step}; -use phoxal::runtime::step::{Io, Publisher, Runtime, RuntimeInputs}; -use phoxal::runtime::{EmptyArgs, RobotRuntimeArgs}; +use phoxal::runtime::{EmptyArgs, Io, Publisher, RobotRuntimeArgs, Runtime, RuntimeInputs}; use tracing::info; #[derive(Clone)] @@ -180,7 +179,7 @@ impl Runtime for Ddsm115Runtime { } async fn new(io: &mut Io, config: Self::Config) -> Result { - let command_topic = motor::topic( + let command_topic = motor::command::path( &config.actuator_id.component_id, &config.actuator_id.capability_id, ); @@ -252,7 +251,7 @@ async fn declare_encoder_publisher( return Ok(None); }; Ok(Some( - io.publisher::>(&encoder::topic( + io.publisher::>(&encoder::path( &encoder.capability.component_id, &encoder.capability.capability_id, )) diff --git a/vl53l1x/src/main.rs b/vl53l1x/src/main.rs index 51d5483..2ea75b0 100644 --- a/vl53l1x/src/main.rs +++ b/vl53l1x/src/main.rs @@ -2,7 +2,7 @@ mod runtime; use anyhow::Result; use clap::Parser; -use phoxal::runtime::{DriverRuntimeArgs, step::RuntimeProcess}; +use phoxal::runtime::{DriverRuntimeArgs, RuntimeProcess}; use phoxal::util::init_tracing; use tracing::info; diff --git a/vl53l1x/src/runtime.rs b/vl53l1x/src/runtime.rs index 9a04b72..22855e5 100644 --- a/vl53l1x/src/runtime.rs +++ b/vl53l1x/src/runtime.rs @@ -4,8 +4,7 @@ use phoxal::bus::pubsub::Stamped; use phoxal::model::component::v1::CapabilityRef; use phoxal::model::component::v1::capability::{Capability, Range as RangeConfig}; use phoxal::runtime::clock::{Schedule, SchedulePolicy, Step}; -use phoxal::runtime::step::{Io, Publisher, Runtime, RuntimeInputs}; -use phoxal::runtime::{EmptyArgs, RobotRuntimeArgs}; +use phoxal::runtime::{EmptyArgs, Io, Publisher, RobotRuntimeArgs, Runtime, RuntimeInputs}; #[derive(Clone)] pub struct Config { @@ -113,7 +112,7 @@ impl Runtime for Vl53l1xRuntime { async fn new(io: &mut Io, config: Self::Config) -> Result { let range_pub = io - .publisher::>(&range::topic( + .publisher::>(&range::path( &config.range.capability.component_id, &config.range.capability.capability_id, ))