asked the clanker to change the arcidecture a bit

This commit is contained in:
2026-09-09 15:50:07 +01:00
parent 3490af52e4
commit b9c7e73824
15 changed files with 185 additions and 74 deletions
+13
View File
@@ -0,0 +1,13 @@
[package]
name = "services"
version.workspace = true
edition.workspace = true
[lib]
name = "services"
path = "src/lib.rs"
[dependencies]
common = { path = "../common" }
service_datetime = { package = "service-datetime", path = "datetime" }
iced = { workspace = true }
@@ -1,10 +1,10 @@
[package]
name = "service-datatime"
name = "service-datetime"
version.workspace = true
edition.workspace = true
[lib]
name = "service_datatime"
name = "service_datetime"
path = "src/lib.rs"
[dependencies]
+14
View File
@@ -0,0 +1,14 @@
//! Service registry: turns a route key into the subscription that backs it.
//! Adding a service is a new crate under `crates/services/` plus one arm in
//! `subscription` — core never changes.
use iced::Subscription;
use common::{Service, ServicePayloadKind};
/// The subscription backing a route key.
pub fn subscription(service: &Service) -> Subscription<ServicePayloadKind> {
match service {
Service::Clock(_) => service_datetime::ClockTicker::run(),
}
}