Skip to content

Commit

Permalink
fix jsonrpsee: feature renamed client -> async-client (#625)
Browse files Browse the repository at this point in the history
* feature renamed to async-client

* export rpc_macro for core client

* re-export core from wrapper crate

* rename feature core-client -> async-client

* add client feature too

* reorg features
  • Loading branch information
niklasad1 authored Dec 22, 2021
1 parent 906bbd4 commit f319d58
Show file tree
Hide file tree
Showing 2 changed files with 15 additions and 5 deletions.
6 changes: 3 additions & 3 deletions jsonrpsee/Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -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"]
14 changes: 12 additions & 2 deletions jsonrpsee/src/lib.rs
Original file line number Diff line number Diff line change
Expand Up @@ -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")]
Expand All @@ -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.
Expand All @@ -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")]
Expand Down

0 comments on commit f319d58

Please sign in to comment.