diff --git a/jsonrpsee/Cargo.toml b/jsonrpsee/Cargo.toml index 4e98d13a7c..41cdf3b20c 100644 --- a/jsonrpsee/Cargo.toml +++ b/jsonrpsee/Cargo.toml @@ -24,13 +24,13 @@ jsonrpsee-types = { path = "../types", version = "0.6.1", package = "jsonrpsee-t [features] client-ws-transport = ["jsonrpsee-client-transport/ws", "jsonrpsee-client-transport/tls"] client-ws-transport-no-tls = ["jsonrpsee-client-transport/ws"] -core-client = ["jsonrpsee-core/client"] +async-client = ["jsonrpsee-core/async-client"] http-client = ["jsonrpsee-http-client", "jsonrpsee-types", "jsonrpsee-core"] http-server = ["jsonrpsee-http-server", "jsonrpsee-types", "jsonrpsee-core"] -ws-client = ["jsonrpsee-ws-client", "jsonrpsee-types", "jsonrpsee-core/client"] +ws-client = ["jsonrpsee-ws-client", "jsonrpsee-types", "jsonrpsee-core/async-client"] ws-server = ["jsonrpsee-ws-server", "jsonrpsee-types", "jsonrpsee-core"] macros = ["jsonrpsee-proc-macros", "jsonrpsee-types"] client = ["http-client", "ws-client"] server = ["http-server", "ws-server"] -full = ["client", "server", "macros", "core-client", "client-ws-transport"] +full = ["client", "server", "macros", "async-client", "client-ws-transport"] diff --git a/jsonrpsee/src/lib.rs b/jsonrpsee/src/lib.rs index b912325320..9e2d2bfc3c 100644 --- a/jsonrpsee/src/lib.rs +++ b/jsonrpsee/src/lib.rs @@ -43,6 +43,9 @@ //! - **`client`** - Enables `http-client` and `ws-client` features. //! - **`server`** - Enables `http-server` and `ws-server` features. //! - **`full`** - Enables `client`, `server` and `macros` features. +//! - **`async-client`** - Enables the async client without any transport. +//! - **`client-ws-transport`** - Enables `ws` transport with TLS. +//! - **`client-ws-transport-no-tls`** - Enables `ws` transport without TLS. /// JSON-RPC HTTP client. #[cfg(feature = "jsonrpsee-http-client")] @@ -56,7 +59,7 @@ pub use jsonrpsee_ws_client as ws_client; pub use jsonrpsee_client_transport as client_transport; /// JSON-RPC client convenience macro to build params. -#[cfg(any(feature = "http-client", feature = "ws-client"))] +#[cfg(any(feature = "async-client", feature = "http-client", feature = "ws-client"))] pub use jsonrpsee_core::rpc_params; /// JSON-RPC HTTP server. @@ -79,7 +82,14 @@ pub use jsonrpsee_types as types; #[cfg(any(feature = "http-server", feature = "ws-server"))] pub use jsonrpsee_core::server::rpc_module::{RpcModule, SubscriptionSink}; -#[cfg(any(feature = "http-server", feature = "ws-server", feature = "core-client"))] +#[cfg(any( + feature = "http-server", + feature = "ws-server", + feature = "client", + feature = "async-client", + feature = "http-client", + feature = "ws-client" +))] pub use jsonrpsee_core as core; #[cfg(feature = "http-server")]