commit c47ca80391953813005cb658dd6617640154c99b
parent d581dedb72e8293bd34929c119590f1081327328
Author: triesap <tyson@radroots.org>
Date: Tue, 30 Jun 2026 22:57:51 +0000
sdk: clean default guard warnings
- gate private farm helpers to runtime builds
- gate order request parsing to runtime builds
- keep signer draft helpers behind signer adapters
- prove source-boundary warning hygiene
Diffstat:
3 files changed, 9 insertions(+), 5 deletions(-)
diff --git a/crates/sdk/src/farm.rs b/crates/sdk/src/farm.rs
@@ -1,10 +1,12 @@
pub use radroots_events::farm::*;
+
+#[cfg(feature = "runtime")]
pub use radroots_events_codec::error::EventEncodeError;
-#[cfg(feature = "serde_json")]
+#[cfg(feature = "runtime")]
use radroots_events_codec::wire::WireEventParts;
-#[cfg(feature = "serde_json")]
+#[cfg(feature = "runtime")]
pub fn build_draft(farm: &RadrootsFarm) -> Result<WireEventParts, EventEncodeError> {
radroots_events_codec::farm::encode::to_wire_parts(farm)
}
diff --git a/crates/sdk/src/lib.rs b/crates/sdk/src/lib.rs
@@ -17,6 +17,7 @@ pub mod adapters;
mod dvm_runtime;
#[cfg(feature = "runtime")]
mod error;
+#[cfg(feature = "runtime")]
mod farm;
#[cfg(feature = "runtime")]
mod farms_runtime;
@@ -30,6 +31,7 @@ pub mod identity;
mod listings_runtime;
#[cfg(feature = "runtime")]
mod market_runtime;
+#[cfg(feature = "runtime")]
mod order;
#[cfg(feature = "runtime")]
mod orders_runtime;
diff --git a/crates/sdk/src/order.rs b/crates/sdk/src/order.rs
@@ -1,10 +1,10 @@
pub use radroots_events::order::*;
#[cfg(any(feature = "signer-adapters", test))]
pub use radroots_events_codec::error::EventEncodeError;
-#[cfg(feature = "serde_json")]
+#[cfg(feature = "runtime")]
pub use radroots_events_codec::order::RadrootsOrderEnvelopeParseError;
-#[cfg(feature = "serde_json")]
+#[cfg(feature = "runtime")]
use radroots_events::RadrootsNostrEvent;
#[cfg(all(feature = "serde_json", any(feature = "signer-adapters", test)))]
use radroots_events::{RadrootsNostrEventPtr, ids::RadrootsEventId};
@@ -146,7 +146,7 @@ pub fn build_order_cancellation_draft(
})
}
-#[cfg(feature = "serde_json")]
+#[cfg(feature = "runtime")]
pub fn parse_order_request(
event: &RadrootsNostrEvent,
) -> Result<RadrootsOrderEnvelope<RadrootsOrderRequest>, RadrootsOrderEnvelopeParseError> {