diff --git a/rpc/core/src/bindings/mod.rs b/rpc/core/src/bindings/mod.rs index 213cfe377..b35fa03fb 100644 --- a/rpc/core/src/bindings/mod.rs +++ b/rpc/core/src/bindings/mod.rs @@ -1,2 +1,5 @@ #[cfg(feature = "py-sdk")] pub mod python; + +#[cfg(feature = "wasm32-sdk")] +pub mod wasm; diff --git a/rpc/core/src/wasm/convert.rs b/rpc/core/src/bindings/wasm/convert.rs similarity index 100% rename from rpc/core/src/wasm/convert.rs rename to rpc/core/src/bindings/wasm/convert.rs diff --git a/rpc/core/src/wasm/message.rs b/rpc/core/src/bindings/wasm/message.rs similarity index 100% rename from rpc/core/src/wasm/message.rs rename to rpc/core/src/bindings/wasm/message.rs diff --git a/rpc/core/src/wasm/mod.rs b/rpc/core/src/bindings/wasm/mod.rs similarity index 100% rename from rpc/core/src/wasm/mod.rs rename to rpc/core/src/bindings/wasm/mod.rs diff --git a/rpc/core/src/lib.rs b/rpc/core/src/lib.rs index 661c884f5..488444734 100644 --- a/rpc/core/src/lib.rs +++ b/rpc/core/src/lib.rs @@ -2,13 +2,13 @@ #![recursion_limit = "256"] pub mod api; -#[cfg(feature = "py-sdk")] +#[cfg(any(feature = "wasm32-sdk", feature = "py-sdk"))] pub mod bindings; pub mod convert; pub mod error; pub mod model; pub mod notify; -pub mod wasm; +// pub mod wasm; pub mod prelude { pub use super::api::notifications::*; diff --git a/rpc/wrpc/bindings/wasm/src/client.rs b/rpc/wrpc/bindings/wasm/src/client.rs index 81487172f..f20cec84d 100644 --- a/rpc/wrpc/bindings/wasm/src/client.rs +++ b/rpc/wrpc/bindings/wasm/src/client.rs @@ -12,7 +12,7 @@ use kaspa_notify::events::EventType; use kaspa_notify::listener; use kaspa_notify::notification::Notification as NotificationT; use kaspa_rpc_core::api::ctl; -pub use kaspa_rpc_core::wasm::message::*; +pub use kaspa_rpc_core::bindings::wasm::message::*; pub use kaspa_rpc_macros::{ build_wrpc_wasm_bindgen_interface, build_wrpc_wasm_bindgen_subscriptions, declare_typescript_wasm_interface as declare, }; diff --git a/wasm/src/lib.rs b/wasm/src/lib.rs index d48b94081..5ed402246 100644 --- a/wasm/src/lib.rs +++ b/wasm/src/lib.rs @@ -156,7 +156,7 @@ cfg_if::cfg_if! { pub use kaspa_rpc_core::model::message::*; } pub use kaspa_rpc_core::api::rpc::RpcApi; - pub use kaspa_rpc_core::wasm::message::*; + pub use kaspa_rpc_core::bindings::wasm::message::*; pub use kaspa_wrpc_wasm::client::*; pub use kaspa_wrpc_wasm::resolver::*; @@ -183,7 +183,7 @@ cfg_if::cfg_if! { pub use kaspa_rpc_core::model::message::*; } pub use kaspa_rpc_core::api::rpc::RpcApi; - pub use kaspa_rpc_core::wasm::message::*; + pub use kaspa_rpc_core::bindings::wasm::message::*; pub use kaspa_wrpc_wasm::client::*; pub use kaspa_wrpc_wasm::resolver::*; @@ -197,8 +197,8 @@ cfg_if::cfg_if! { } else if #[cfg(feature = "wasm32-rpc")] { pub use kaspa_rpc_core::api::rpc::RpcApi; - pub use kaspa_rpc_core::wasm::message::*; - pub use kaspa_rpc_core::wasm::message::IPingRequest; + pub use kaspa_rpc_core::bindings::wasm::message::*; + pub use kaspa_rpc_core::bindings::wasm::message::IPingRequest; pub use kaspa_wrpc_wasm::client::*; pub use kaspa_wrpc_wasm::resolver::*; pub use kaspa_wrpc_wasm::notify::*;