Skip to content

Commit 9360dc8

Browse files
dvc94chascjones
authored andcommitted
Implement client support (paritytech#405)
* Exclude stderr in editorconfig. * Fix some warnings. * Implement std::error::Error for Error. * Implement jsonrpc client. * Add returns attribute. * Generalize where clause generation. * Generate client. * Make client/server generation optional. * Update examples. * Add websocket client. * Fix tests. * Run rustfmt. * Add local client. * Export RpcChannel and RpcError. * Update client/Cargo.toml Co-Authored-By: dvc94ch <[email protected]> * Update ws/client/Cargo.toml Co-Authored-By: dvc94ch <[email protected]> * Improve error reporting. * Address review issues. * Fix tests. * Add example. * Add compile tests.
1 parent eaa5f24 commit 9360dc8

35 files changed

+1085
-91
lines changed

.editorconfig

Lines changed: 9 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,16 @@ trim_trailing_whitespace=true
99
max_line_length=120
1010
insert_final_newline=true
1111

12-
[.travis.yml]
12+
[{.travis.yml,appveyor.yml}]
1313
indent_style=space
1414
indent_size=2
1515
tab_width=8
1616
end_of_line=lf
17+
18+
[*.stderr]
19+
indent_style=none
20+
indent_size=none
21+
end_of_line=none
22+
charset=none
23+
trim_trailing_whitespace=none
24+
insert_final_newline=none

Cargo.toml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
[workspace]
22
members = [
33
"core",
4+
"client",
45
"http",
56
"ipc",
67
"derive",
@@ -11,4 +12,5 @@ members = [
1112
"tcp",
1213
"test",
1314
"ws",
15+
"ws/client",
1416
]

_automate/publish.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,7 +2,7 @@
22

33
set -exu
44

5-
ORDER=(core server-utils tcp ws http ipc stdio pubsub macros derive test)
5+
ORDER=(core client server-utils tcp ws ws/client http ipc stdio pubsub macros derive test)
66

77
for crate in ${ORDER[@]}; do
88
cd $crate

client/Cargo.toml

Lines changed: 35 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,35 @@
1+
[package]
2+
authors = ["Parity Technologies <[email protected]>"]
3+
description = "Transport agnostic JSON-RPC 2.0 client implementation."
4+
documentation = "https://docs.rs/jsonrpc-client/"
5+
edition = "2018"
6+
homepage = "https://github.com/paritytech/jsonrpc"
7+
keywords = ["jsonrpc", "json-rpc", "json", "rpc", "serde"]
8+
license = "MIT"
9+
name = "jsonrpc-client"
10+
repository = "https://github.com/paritytech/jsonrpc"
11+
version = "10.1.0"
12+
13+
categories = [
14+
"asynchronous",
15+
"network-programming",
16+
"web-programming::http-client",
17+
"web-programming::http-server",
18+
"web-programming::websocket",
19+
]
20+
21+
[dependencies]
22+
failure = "0.1"
23+
futures = "~0.1.6"
24+
jsonrpc-core = { version = "10.1", path = "../core" }
25+
log = "0.4"
26+
serde_json = "1.0"
27+
28+
[dev-dependencies]
29+
jsonrpc-derive = { version = "10.1", path = "../derive" }
30+
jsonrpc-client = { version = "10.1", path = "." }
31+
serde = "1.0"
32+
tokio = "0.1"
33+
34+
[badges]
35+
travis-ci = { repository = "paritytech/jsonrpc", branch = "master"}

0 commit comments

Comments
 (0)