File tree 3 files changed +17
-9
lines changed
3 files changed +17
-9
lines changed Original file line number Diff line number Diff line change @@ -30,8 +30,11 @@ before_script:
30
30
- rustup component add rustfmt
31
31
32
32
script :
33
- - cargo build --all --features "$JSONRPC_CLIENT_FEATURES"
34
- - cargo test --all --features "$JSONRPC_CLIENT_FEATURES"
33
+ - cargo build --all
34
+ - cargo test --all
35
+ - cargo test --manifest-path=core-client/Cargo.toml --features "http"
36
+ - cargo test --manifest-path=core-client/Cargo.toml --features "http, tls"
37
+ - cargo test --manifest-path=core-client/Cargo.toml --features "ws"
35
38
- |
36
39
([ $TRAVIS_RUST_VERSION = stable ] && cargo fmt --all -- --check) || true
37
40
@@ -40,7 +43,6 @@ after_success: |
40
43
[ $TRAVIS_BRANCH = master ] &&
41
44
[ $TRAVIS_PULL_REQUEST = false ] &&
42
45
[ $TRAVIS_RUST_VERSION = stable ] &&
43
- [ $JSONRPC_CLIENT_FEATURES = '' ] &&
44
46
cargo doc --all --no-deps &&
45
47
echo '<meta http-equiv=refresh content=0;url=jsonrpc_core/index.html>' > target/doc/index.html &&
46
48
pip install --user ghp-import &&
@@ -50,6 +52,4 @@ after_success: |
50
52
env :
51
53
global :
52
54
- secure : " QA4Rw78VSsP1vH2Yve1eAVpjG32HH9DZZ79xrhxZXp34wKoemp+aGqaFN/8uXPfsXshlYxtMCTT6M9OiWTTLvku5tI5kBsDneu8mLut7eBZHVniYSp2SbKpTeqfpGMDHoCR0WD9AlWDn9Elm6txbghXjrxhCMg8gkhhsLGnQt/ARFF1wRHnXT0TjJg8fQtd+/OK0TaRfknx1RptruaznxfUi3DBwzDdzaMMZfd3VjWR1hPFRpDSL0mM+l6OjNrLbCeiR//k3lV4rpIhedsz0ODjfW2Hdk63qCaLJsXCkG1Bcuf/FYbYC+osm5SrHhGA1j2EgazWcLA6Wkzt15KPOR/HirNj+PCiS0YbGKM5Ac5LT6m6q0iYSF/pq1+jDurcSwBwYrTOY6X2FZCZQBfTP/4qnSjWgGPOkzBSMS6BNEBDQZgdc3xCASXadj7waF4Y4UGD0bDPuBtXopI4ppKLqSa7CsvKz6TX2yW0UVgUuQ5/jz/S+fkcz74o016d5x027yjaxAu/Z8fQFLSaBtiFU8sBzA+MDU3apFgjsYXiaGYZ8gDrp7WjbfHNYfBAMEHHKY4toywB5Vi8zJxF+Wn1n4hkvb/kDqSV9giFmWEg321U+pAGNAH4yY25tIJqS8gT89cz4oQJp7aWjA3Ke01e104yqqZU+N+CSyZHEeksdPt8="
53
- matrix :
54
- - JSONRPC_CLIENT_FEATURES=''
55
- - JSONRPC_CLIENT_FEATURES='tls'
55
+
Original file line number Diff line number Diff line change @@ -20,24 +20,30 @@ categories = [
20
20
21
21
[features ]
22
22
tls = [" hyper-tls" ]
23
+ http = [" hyper" ]
24
+ ws = [
25
+ " websocket" ,
26
+ " tokio" ,
27
+ ]
23
28
24
29
[dependencies ]
25
30
failure = " 0.1"
26
31
futures = " 0.1.26"
27
- hyper = " 0.12"
32
+ hyper = { version = " 0.12" , optional = true }
28
33
hyper-tls = { version = " 0.3.2" , optional = true }
29
34
jsonrpc-core = { version = " 11.0" , path = " ../core" }
30
35
log = " 0.4"
31
36
serde = " 1.0"
32
37
serde_json = " 1.0"
33
- tokio = " 0.1"
34
- websocket = " 0.22"
38
+ tokio = { version = " 0.1" , optional = true }
39
+ websocket = { version = " 0.22" , optional = true }
35
40
36
41
[dev-dependencies ]
37
42
assert_matches = " 1.1"
38
43
jsonrpc-http-server = { version = " 11.0" , path = " ../http" }
39
44
lazy_static = " 1.0"
40
45
env_logger = " 0.6"
46
+ tokio = " 0.1"
41
47
42
48
[badges ]
43
49
travis-ci = { repository = " paritytech/jsonrpc" , branch = " master" }
Original file line number Diff line number Diff line change @@ -6,8 +6,10 @@ use serde_json::Value;
6
6
use crate :: { RpcError , RpcMessage } ;
7
7
8
8
pub mod duplex;
9
+ #[ cfg( feature = "http" ) ]
9
10
pub mod http;
10
11
pub mod local;
12
+ #[ cfg( feature = "ws" ) ]
11
13
pub mod ws;
12
14
13
15
pub use duplex:: duplex;
You can’t perform that action at this time.
0 commit comments