Skip to content

Commit

Permalink
Implement client support (paritytech#405)
Browse files Browse the repository at this point in the history
* 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.
  • Loading branch information
dvc94ch authored and ascjones committed Apr 2, 2019
1 parent eaa5f24 commit 9360dc8
Show file tree
Hide file tree
Showing 35 changed files with 1,085 additions and 91 deletions.
10 changes: 9 additions & 1 deletion .editorconfig
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,16 @@ trim_trailing_whitespace=true
max_line_length=120
insert_final_newline=true

[.travis.yml]
[{.travis.yml,appveyor.yml}]
indent_style=space
indent_size=2
tab_width=8
end_of_line=lf

[*.stderr]
indent_style=none
indent_size=none
end_of_line=none
charset=none
trim_trailing_whitespace=none
insert_final_newline=none
2 changes: 2 additions & 0 deletions Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
[workspace]
members = [
"core",
"client",
"http",
"ipc",
"derive",
Expand All @@ -11,4 +12,5 @@ members = [
"tcp",
"test",
"ws",
"ws/client",
]
2 changes: 1 addition & 1 deletion _automate/publish.sh
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@

set -exu

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

for crate in ${ORDER[@]}; do
cd $crate
Expand Down
35 changes: 35 additions & 0 deletions client/Cargo.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,35 @@
[package]
authors = ["Parity Technologies <[email protected]>"]
description = "Transport agnostic JSON-RPC 2.0 client implementation."
documentation = "https://docs.rs/jsonrpc-client/"
edition = "2018"
homepage = "https://github.com/paritytech/jsonrpc"
keywords = ["jsonrpc", "json-rpc", "json", "rpc", "serde"]
license = "MIT"
name = "jsonrpc-client"
repository = "https://github.com/paritytech/jsonrpc"
version = "10.1.0"

categories = [
"asynchronous",
"network-programming",
"web-programming::http-client",
"web-programming::http-server",
"web-programming::websocket",
]

[dependencies]
failure = "0.1"
futures = "~0.1.6"
jsonrpc-core = { version = "10.1", path = "../core" }
log = "0.4"
serde_json = "1.0"

[dev-dependencies]
jsonrpc-derive = { version = "10.1", path = "../derive" }
jsonrpc-client = { version = "10.1", path = "." }
serde = "1.0"
tokio = "0.1"

[badges]
travis-ci = { repository = "paritytech/jsonrpc", branch = "master"}
Loading

0 comments on commit 9360dc8

Please sign in to comment.