-
Notifications
You must be signed in to change notification settings - Fork 228
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
rpc: guard client with feature flag (#343)
Guard client code paths To avoid the transient dependency on net related crates for users who are primarily interested in the core types. Follow-up #339 Ref #337
- Loading branch information
Showing
7 changed files
with
27 additions
and
12 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -4,17 +4,22 @@ version = "0.1.0" | |
authors = ["Alexander Simmerl <[email protected]>"] | ||
edition = "2018" | ||
|
||
[features] | ||
default = [] | ||
client = [ "async-tungstenite", "futures", "http", "hyper", "tokio" ] | ||
|
||
[dependencies] | ||
async-tungstenite = {version="0.5", features = ["tokio-runtime"]} | ||
bytes = "0.5" | ||
futures = "0.3" | ||
getrandom = "0.1" | ||
http = "0.2" | ||
hyper = "0.13" | ||
serde = { version = "1", features = [ "derive" ] } | ||
serde_bytes = "0.11" | ||
serde_json = "1" | ||
tendermint = { version = "0.13.0", path = "../tendermint" } | ||
thiserror = "1" | ||
tokio = { version = "0.2", features = ["macros"] } | ||
uuid = { version = "0.8", default-features = false } | ||
|
||
async-tungstenite = { version="0.5", features = ["tokio-runtime"], optional = true } | ||
futures = { version = "0.3", optional = true } | ||
http = { version = "0.2", optional = true } | ||
hyper = { version = "0.13", optional = true } | ||
tokio = { version = "0.2", features = ["macros"], optional = true } |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,18 +1,18 @@ | ||
//! Tendermint RPC definitons and types. | ||
#[cfg(feature = "client")] | ||
mod client; | ||
#[cfg(feature = "client")] | ||
pub use client::{event_listener, Client}; | ||
|
||
pub mod endpoint; | ||
pub mod error; | ||
// TODO(ismail): document fields or re-use the abci types | ||
#[allow(missing_docs)] | ||
pub mod event_listener; | ||
mod id; | ||
mod method; | ||
pub mod request; | ||
pub mod response; | ||
mod version; | ||
|
||
pub use self::{ | ||
client::Client, error::Error, id::Id, method::Method, request::Request, response::Response, | ||
version::Version, | ||
error::Error, id::Id, method::Method, request::Request, response::Response, version::Version, | ||
}; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters