sdk

Radroots SDK and bindings
git clone https://radroots.dev/git/sdk.git
Log | Files | Refs | README

commit 748ca41cb2ad3462a5aab3310c6bd6e0901dbb68
parent c178b9495109c530abea18e0d489ae2e57d3da7a
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:
Mcrates/sdk/src/farm.rs | 6++++--
Mcrates/sdk/src/lib.rs | 2++
Mcrates/sdk/src/order.rs | 6+++---
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> {