From 821c6ce47c53265614bbabb52ce3d090125fdaef Mon Sep 17 00:00:00 2001 From: bunnie Date: Tue, 20 May 2025 14:38:03 +0800 Subject: [PATCH] cleanup dependency tree going down to the cramium-hal layer remove features that we don't need so as to make the tree as simple as possible to descend in particular if we're just pinging the HAL layer for some simple constants we don't have to pull in the hairball of std targets --- services/cram-hal-service/Cargo.toml | 8 ++++---- services/keystore/Cargo.toml | 2 ++ services/modals/Cargo.toml | 20 +++++++++++--------- 3 files changed, 17 insertions(+), 13 deletions(-) diff --git a/services/cram-hal-service/Cargo.toml b/services/cram-hal-service/Cargo.toml index 8424cbf37..f2e78731c 100644 --- a/services/cram-hal-service/Cargo.toml +++ b/services/cram-hal-service/Cargo.toml @@ -15,10 +15,7 @@ xous = { version = "0.9.66", features = ["raw-trng"] } xous-ipc = "0.10.6" log-server = { package = "xous-api-log", version = "0.1.65" } log = "0.4.14" -cramium-hal = { path = "../../libs/cramium-hal", features = [ - "derive-rkyv", - "std", -] } +cramium-hal = { path = "../../libs/cramium-hal", default-features = false } cramium-api = { path = "../../libs/cramium-api", features = [ "derive-rkyv", "std", @@ -48,6 +45,9 @@ rawserial = [] pinger = [] swap = [] mpw = ["cramium-hal/mpw"] +board-baosec = ["cramium-hal/board-baosec"] +board-baosor = ["cramium-hal/board-baosor"] +board-dabao = ["cramium-hal/board-dabao"] # add this feature to enable pre-emption quantum-timer = ["utralib", "pio"] default = ["app-uart", "utralib"] diff --git a/services/keystore/Cargo.toml b/services/keystore/Cargo.toml index e3b695f3f..69eb3fefe 100644 --- a/services/keystore/Cargo.toml +++ b/services/keystore/Cargo.toml @@ -80,6 +80,7 @@ board-baosec = [ "ux-api/board-baosec", "keystore-api/gen2", "modals/no-gam", + "modals/cramium-soc", ] # USB form factor token loader-baosec = ["ux-api/loader-baosec"] test-baosec = ["ux-api/loader-baosec"] @@ -90,6 +91,7 @@ hosted-baosec = [ board-baosor = [ "utralib/cramium-soc", "keystore-api/gen2", + "modals/cramium-soc", ] # Precursor form factor loader-baosor = [] board-dabao = [ diff --git a/services/modals/Cargo.toml b/services/modals/Cargo.toml index d691bb2d2..e18fa5541 100644 --- a/services/modals/Cargo.toml +++ b/services/modals/Cargo.toml @@ -25,25 +25,27 @@ cram-hal-service = { path = "../cram-hal-service", optional = true } # provides tts-frontend = { path = "../tts", optional = true } locales = { path = "../../locales" } bit_field = "0.9.0" -cramium-hal = { path = "../../libs/cramium-hal", optional = true, features = [ - "std", -] } cramium-api = { path = "../../libs/cramium-api", optional = true } cramium-emu = { path = "../cramium-emu", optional = true } blitstr2 = { path = "../../libs/blitstr2" } ux-api = { path = "../../libs/ux-api", optional = true, features = ["std"] } -utralib = { version = "0.1.25", optional = true, default-features = false } [features] no-gam = [] -precursor = ["utralib/precursor", "trng", "gam", "tts-frontend"] -hosted = ["utralib/hosted", "trng", "gam", "tts-frontend"] -renode = ["utralib/renode", "trng", "gam", "tts-frontend"] +precursor = ["trng", "gam", "tts-frontend"] +hosted = ["trng", "gam", "tts-frontend"] +renode = ["trng", "gam", "tts-frontend"] -cramium-soc = ["utralib/cramium-soc", "cram-hal-service", "no-gam"] +cramium-soc = ["cram-hal-service", "no-gam"] hosted-baosec = ["ux-api/hosted-baosec", "cramium-emu", "cramium-api", "no-gam"] -board-baosec = ["ux-api/board-baosec", "cramium-api", "no-gam"] +board-baosec = [ + "ux-api/board-baosec", + "cramium-api", + "no-gam", + "cram-hal-service/board-baosec", + "cramium-soc", +] doc-deps = ["gam", "ux-api/doc-deps"] modal-testing = []