- Jun 01, 2021
-
-
Igor Aleksanov authored
-
Igor Aleksanov authored
* Add basic support for async methods * Add support of async methods into ws server * Add support of async methods to HTTP server * Fix subscriptions method lookup * Remove type that appeared to be unused * Add comment on safety of unwrap in OwnedJsonRpcRequest::borrowed * Update utils/src/server/rpc_module.rs Co-authored-by: Niklas Adolfsson <[email protected]> Co-authored-by: Maciej Hirsz <[email protected]> Co-authored-by: Niklas Adolfsson <[email protected]>
-
David authored
* Remove register_* from Server * Tests pass * Some cleanup * more cleanup * Less bounds * Remove the `RpcMethod` trait – I don't think we need it. * fmt * Fix benches * Enable merging two modules with different contexts * Module registration returns number of methods on the server and checks for dupes Tests for module registration and some cleanup * Export `RpcModule` from façade crate fmt * Revert to return error from `Server::register_module` * Remove Server::methods * Remove TODO * Fix tests Fix http server to work the same as ws-server * Server::method_names * fmt * fix clippy warnings Co-authored-by: Niklas Adolfsson <[email protected]>
-
- May 28, 2021
-
-
Niklas Adolfsson authored
* [ws server]: draft SubscriptionSinkWithParams * rexport types * PoC design2 * improve example * Update ws-server/src/server.rs Co-authored-by: David <[email protected]> * Subscription example (#324) * Add a test for calling methods with multiple params of multiple types (#308) * Add a test for calling methods with multiple params of multiple types * cargo fmt Co-authored-by: Niklas Adolfsson <[email protected]> * [ws client] RegisterNotification support (#303) * Rename NotifResponse to SubscriptionResponse to make room for new impl * Add support for on_notification Subscription<T> types * Fix handling of NotificationHandler in manager * cleanup * Implement NotificationHandler to replace Subscription<T> and clean up plumbing * More cleanup * impl Drop for NotificationHandler * Address pr feedback #1 * ws client register_notification pr feedback 2 * Fix doc * fix typo * Add tests, get NH working * More cleanup of String/&str * fix doc * Drop notification handler on send_back_sink error * ws client notification auto unsubscribe when channel full test * Change order of type params to register_method (#312) * Change order of type params to register_method * Cleanup and fmt * Update ws-server/src/tests.rs Co-authored-by: Niklas Adolfsson <[email protected]> * CI: optimize caching (#317) * Bump actions/checkout from 2 to 2.3.4 (#315) Bumps [actions/checkout](https://github.com/actions/checkout) from 2 to 2.3.4. - [Release notes](https://github.com/actions/checkout/releases) - [Changelog](https://github.com/actions/checkout/blob/main/CHANGELOG.md) - [Commits](https://github.com/actions/checkout/compare/v2...v2.3.4 ) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump actions-rs/cargo from 1 to 1.0.3 (#314) Bumps [actions-rs/cargo](https://github.com/actions-rs/cargo) from 1 to 1.0.3. - [Release notes](https://github.com/actions-rs/cargo/releases) - [Changelog](https://github.com/actions-rs/cargo/blob/master/CHANGELOG.md) - [Commits](https://github.com/actions-rs/cargo/compare/v1...v1.0.3 ) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * Bump actions-rs/toolchain from 1 to 1.0.7 (#313) Bumps [actions-rs/toolchain](https://github.com/actions-rs/toolchain) from 1 to 1.0.7. - [Release notes](https://github.com/actions-rs/toolchain/releases) - [Changelog](https://github.com/actions-rs/toolchain/blob/master/CHANGELOG.md) - [Commits](https://github.com/actions-rs/toolchain/compare/v1...v1.0.7 ) Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> * [ws server]: add logs (#319) * WIP - hangs * fix example * cleanup * Add certificate_store() to WsClientBuilder (#321) * Add custom_certificate to WsClientBuilder * Use system certs instead of specified file * Cache client_config * Move client_config logic to fn build * Default use_system_certificates to true * Move out connector * Add CertificateStore type * cargo fmt * cargo clippy * Resolve comment: Rename variable * Resolved comments Co-authored-by: Niklas Adolfsson <[email protected]> Co-authored-by: Billy Lindeman <[email protected]> Co-authored-by: Denis Pisarev <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Albin Hedman <[email protected]> * grumbles: impl maciej proposal * fix test build * add test for subscription with param * cargo fmt * Update examples/ws_subscription.rs Co-authored-by: David <[email protected]> * Update utils/src/server/rpc_module.rs Co-authored-by: David <[email protected]> * Update utils/src/server/rpc_module.rs Co-authored-by: David <[email protected]> * Update utils/src/server/rpc_module.rs Co-authored-by: David <[email protected]> * Update utils/src/server/rpc_module.rs Co-authored-by: David <[email protected]> * Update utils/src/server/rpc_module.rs Co-authored-by: David <[email protected]> * grumbles * Update utils/src/server/rpc_module.rs Co-authored-by: David <[email protected]> * Update utils/src/server/rpc_module.rs Co-authored-by: David <[email protected]> * Update utils/src/server/rpc_module.rs Co-authored-by: Maciej Hirsz <[email protected]> * fix more grumbles * [subscriptionSink]: introduce into_sinks * use replace * fix more nits * maciej design 2 * fix tests * remove log * [rpc context mod]: register_subscription with ctx * nits * nits again * move subscribers mutex * clippy * [ws subscribe]: avoid send message on unsubscribed * revert unintentional changes * Subscription with context example (#345) * Add weather example to show how to use subscriptions with context * Add note * Cleanup * Additional cleanup (#347) * Add weather example to show how to use subscriptions with context * Add note * Cleanup * fmt * Cleanup and docs * fmt * ignore error on subscription Co-authored-by: David Palm <[email protected]> Co-authored-by: Billy Lindeman <[email protected]> Co-authored-by: Denis Pisarev <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com> Co-authored-by: Albin Hedman <[email protected]> Co-authored-by: Maciej Hirsz <[email protected]>
-
- May 27, 2021
-
-
Niklas Adolfsson authored
-
Niklas Adolfsson authored
The reason is that `Receiver::next` won't panic polling after `Ok(None)` has been received.
-
Niklas Adolfsson authored
-
- May 24, 2021
-
-
David authored
* Switch from anyhow::Result to std Result * fmt * Use thiserror `#[from]` * Remove sadness
-
- May 19, 2021
-
-
Igor Aleksanov authored
-
Niklas Adolfsson authored
* get started * add additional test * fix nits * cargo fmt * [types]: write some tests. * [http server]: send empty response on notifs * [http server]: fix tests * [rpc module]: send subscription response * Update types/src/v2/error.rs * fix nits * cargo fmt * Update types/src/v2/params.rs * remove needless clone * remove dead code * [types]: impl PartialEq for JsonErrorObject + test * use beef::Cow * Update http-server/src/tests.rs
-
- May 18, 2021
-
-
Niklas Adolfsson authored
* [rpc server]: extract rpc_module to utils. This commit extracts the `rpc_module` from the servers to be shared. It will help to re-use rpc modules within both the servers * Update utils/src/server/rpc_module.rs Co-authored-by: David <[email protected]> * Update utils/src/server/rpc_module.rs Co-authored-by: David <[email protected]> * Update utils/src/server/mod.rs Co-authored-by: David <[email protected]> * Update utils/src/server/rpc_module.rs Co-authored-by: David <[email protected]> * Update utils/src/server/rpc_module.rs Co-authored-by: David <[email protected]> * Update utils/src/server/rpc_module.rs Co-authored-by: David <[email protected]> * Update utils/src/server/rpc_module.rs Co-authored-by: David <[email protected]> * Update utils/src/server/rpc_module.rs Co-authored-by: David <[email protected]> * Update utils/src/server/rpc_module.rs Co-authored-by: David <[email protected]> * Update utils/src/server/rpc_module.rs Co-authored-by: David <[email protected]> * address grumbles * fix build * fix docs * cargo fmt * Update utils/src/server/rpc_module.rs Co-authored-by: David <[email protected]> * grumbles: use MethodSink * Update utils/src/server/mod.rs Co-authored-by: David <[email protected]> * Update utils/src/server/rpc_module.rs Co-authored-by: David <[email protected]> * Update utils/src/server/rpc_module.rs Co-authored-by: David <[email protected]> Co-authored-by: David <[email protected]>
-
- May 12, 2021
-
-
Billy Lindeman authored
* Rename NotifResponse to SubscriptionResponse to make room for new impl * Add support for on_notification Subscription<T> types * Fix handling of NotificationHandler in manager * cleanup * Implement NotificationHandler to replace Subscription<T> and clean up plumbing * More cleanup * impl Drop for NotificationHandler * Address pr feedback #1 * ws client register_notification pr feedback 2 * Fix doc * fix typo * Add tests, get NH working * More cleanup of String/&str * fix doc * Drop notification handler on send_back_sink error * ws client notification auto unsubscribe when channel full test
-
- May 07, 2021
-
-
David authored
* Batch requests over the websocket * Use same call signature for both http and ws server * Use CallError instead of InvalidParams Add a draft batch request test * Sort out formatting of batch responses Cleanup Use CallError * Add test for slow method calls * Update utils/src/server.rs Co-authored-by: Niklas Adolfsson <[email protected]> * Add benchmark for batched websocket requests * rename * Rename batch channels * Sort out the InvalidParams situation * Remove one level of InvalidParams Return app-level error when call fails * Update ws-server/src/server.rs Co-authored-by: Andrew Plaza <[email protected]> * Update ws-server/src/server.rs Co-authored-by: Andrew Plaza <[email protected]> Co-authored-by: Niklas Adolfsson <[email protected]> Co-authored-by: Andrew Plaza <[email protected]>
-
- May 04, 2021
-
-
Niklas Adolfsson authored
* ret err if context/params fails * address grumbles: specific error_code context fail * address grumbles: make env_logger dev-dependency * address grumbles: add tests * chore(deps): remove unused deps * address grumbles: rename types and docs * address grumbles: more renaming. * fix build
-
David authored
* WIP * Implement draft of batch requests * fmt * cleanup * Explain why we don't use an untagged enum * Avoid allocating a Vec for single requets * Add comment * Add a benchmark for batch requests * Add more tests, noting where we diverge from the spec Fix empty batch case, i.e. `[]` * Obey the fmt * Update benches/bench.rs Co-authored-by: Andrew Plaza <[email protected]> * Update http-server/src/server.rs Co-authored-by: Andrew Plaza <[email protected]> * Add link to issue * Explain why we're closing the receiving end of the channel. * Limit logging of requests and response to 1kb Add more comments Factor out batch response collection * Wrap comment * tweak log line * Benchmark batch request over different batch sizes * fmt Co-authored-by: Andrew Plaza <[email protected]>
-
- Apr 28, 2021
-
-
Niklas Adolfsson authored
-
- Apr 27, 2021
-
-
Niklas Adolfsson authored
-
- Apr 26, 2021
-
-
Niklas Adolfsson authored
* [types]: allow `data` field in jsonrpc error obj. * fmt * revert change to make fail * remove redundant test * [types]: bring back `data` and `message` in error. Basically deducing the error message from server defined error doesn't work and we should not strip out this information from to user which might be useful. * remove boiler plate code * [types]: impl From<ErrorCode> for JsonRpcError * address grumbles * remove more boiler plate
-
- Apr 21, 2021
-
-
David authored
* Use a constant to express max request body size Consistently use u32 in all crates * Review grumbles
-
Niklas Adolfsson authored
* prep to release 0.2.0-alpha.5 * fix features * update readme * add changelog * add metadata to the crates on crates.io
-
- Apr 20, 2021
-
-
Niklas Adolfsson authored
-
Niklas Adolfsson authored
* rewrite me * v2 * PoC works without batch request * remove `PartialEq` bounds * add naive benches types * misc * remove useless lifetime * [ws client]: move request ID generation to client * make tests compile again * [client transport]: kill leaky abstractions. * [http client transport]: minor changes in the API. * [ws client]: fix batch requests. * fix nits * [ws client]: generate two request IDs for subscrib * fix tests * remove unused types + less alloc for params. * fix nits * more tweaks. * remove unused code * fix more nits * remove unused legacy types * reorg types_v2 mod * port macros to new types * fix tests again; more jsonvalue * [proc macros]: bring back impl Into for params. * fix build * [proc macros]: make it work for external crates. * [types]: remove weird From<Option<T>> to impl. * cleanup again * [examples]: remove unused async-std dep * Update types/src/v2/mod.rs * [types]: remove unsed dep smallvec * rewrite me * [types]: error code impl ser/deser Manual implementation of serialize/deserialize to get rid of duplicated message string * [types v2]: re-org with explicit mods * fix faulty test * add missed files * [ws client]: req_manager reserve unsubscribe slot. * simplify test code * add tracking issue for TODO * remove unused deps
-
- Apr 16, 2021
-
-
Niklas Adolfsson authored
* [deps futures]: remove unused features I got annoyed that we bring in `futures-executor` as a dependency however `soketto` does this too, so doesn't help for the `WS` stuff. * cargo fmt
-
- Apr 13, 2021
-
-
Caio authored
-
- Apr 12, 2021
-
-
David authored
* Apease Clippy and some renames * Last clippy warning * fmt Co-authored-by: Niklas Adolfsson <[email protected]>
-
Niklas Adolfsson authored
* [utils]: use futures mpsc Use futures::channel::mpsc as it's already brought in as dependency and to avoid bring in tokio sync as an additional dependency. * remove unused deps/code * fix nit * [utils]: future mpsc works without alloc. * [http server]: future mpsc works without alloc.
-
- Apr 02, 2021
-
-
Niklas Adolfsson authored
* prep for 0.2.0-alpha.4 * [http server]: reuse port unix only * skip `reuse_port` on socket
-
- Apr 01, 2021
-
-
Niklas Adolfsson authored
* refactor benches * start * fix build: enable `raw value` feature serde_json * start * port it * make tests compile * fix bench * fix bench * introduce builder pattern * tweaks * remove unused code * cleanup * [http server]: configure tcp socket manually. The major reason is to provide a uniform API with the WebSocket server to return the local address. * remove unused deps * [examples]: remove needless sleep * chore: add docs and refactor noise. * Update types/src/jsonrpc/error.rs * http server use constants
-
- Mar 31, 2021
-
-
Niklas Adolfsson authored
* feat(http client): batch requests * fix(http batch request): request in any order. * Update src/types/jsonrpc/id.rs * tests(batch out-of-order): make it less confusing. * fix nit: `cloned` -> `copied` * fix bad merge * [client]: batch request generic response * wait with impl * [ws client]: add template for batch requests * remove jsonvalue * naive impl * fix make it work, The implemenation is quite inefficient because the responses might be unordered. Currently, a "digest" of a BTreeSet is stored to sort the requestIDs and don't have to try all combinations of requestIDs in the response. * fix nits * error handling * fix nits * more nits * use error msg pattern * add batch requests to client trait Keep it simple by require `Vec<(Method, Params)>` could be improved. * address review comments: use swap_remove Replace read values with `Vec::swap_remove` instead inserting dummy value. The reason is that `Vec::remove` is O(n) * address review grumbles: batch trait bound Default * don't be clever * [http client]: faster lookup for batch request. * fix: distguish request_id and batch_id * thanks clippy * fix: clarify bad response with a separate error * fix tests * add issue link to todo * Update types/src/error.rs Co-authored-by: David <[email protected]> Co-authored-by: David <[email protected]>
-
- Mar 17, 2021
-
-
Niklas Adolfsson authored
-
- Mar 15, 2021
-
-
Niklas Adolfsson authored
* fix clippy warns * [benches]: migrate to benchmark_group * cargo fmt * fix review comment
-
- Mar 12, 2021
-
-
Niklas Adolfsson authored
* implement background error reporting * introduce new error variant * [ws client]: remove `Clone` Breaking change which removes the `Clone` on the `WsClient`. It's better that users explictly makes it clone if that's desired, for example by putting it in `Arc<Mutex>`. * fix build * Update ws-client/src/client.rs * remove unused arc * Update ws-client/src/client.rs Co-authored-by: David <[email protected]> * Update ws-client/src/client.rs Co-authored-by: David <[email protected]> * Update ws-client/src/client.rs Co-authored-by: David <[email protected]> * fix rustdoc link Co-authored-by: David <[email protected]>
-
Maciej Hirsz authored
* Squashed Module * RpcModule and RpcContextModule * Formatting * Add Default to RpcModule Co-authored-by: Niklas Adolfsson <[email protected]> * Fixed grumbles, made module imports explicit * Export the modules Co-authored-by: Niklas Adolfsson <[email protected]>
-
- Mar 09, 2021
-
-
Niklas Adolfsson authored
-
Niklas Adolfsson authored
* [ws client]: register request ID for unsubscribe. Fixes #220 * refactor manager usage * restrict request ID to u8 * Update ws-client/src/tests.rs * rename `max_notifs_per_subscription_capacity` * Update tests/src/lib.rs * fix nits * address grumbles: vecdeq for free slots * resolve todo * [request manager]: add test for max limit. * Update ws-client/src/client.rs Co-authored-by: David <[email protected]> * fix stack overflow * grumbles: MaxMemory -> MaxSlots * address grumbles: stray capacity on configs * Update types/src/client.rs Co-authored-by: David <[email protected]> * grumbles: stray confusing docs * grumbles: doc nits * grumbles: remove nested if let Co-authored-by: David <[email protected]>
-
- Mar 04, 2021
-
-
Niklas Adolfsson authored
* prep for client release. * fix nits * add changelogs * Update http-client/src/lib.rs Co-authored-by: David <[email protected]> * address grumbles: one changelog * 0.2.0-alpha * revert rust2018 lint Co-authored-by: David <[email protected]>
-
- Mar 02, 2021
-
-
Niklas Adolfsson authored
* draft: client trait sketch... * use async_trait instead of `Box<Future>` * refactor client trait * [types]: shared client types. * integrate with `jsonrpsee_proc_macros::rpc_api` * Update proc-macros/src/lib.rs * integrate with proc macros * fix: hacky support for generic types in proc macro * fix: make the examples work. * trait: error associated type * Update types/src/traits.rs * client trait: make object safe. Make the trait usable as a trait object i.e, `Box<dyn Trait>` * client trait: remove `Self::Sized` * add tests for proc macros. * fix build * fmt * [client trait]: remove unused associated error typ * [proc macros]: separate enum variant each return_t * add tracking issue to `TODO` * doc(client trait): improve documentation. * separate trait for subscribing client * add documentation * proc macros: remove debug impl * fix compile warns * address grumbles: remove fn process_response * Update types/src/client.rs Co-authored-by: David <[email protected]> * Update types/src/client.rs Co-authored-by: David <[email protected]> * Update types/src/client.rs Co-authored-by: David <[email protected]> * Update types/src/client.rs Co-authored-by: David <[email protected]> * Update types/src/client.rs Co-authored-by: David <[email protected]> * remove old proc macro tests * address grumbles: shorter lines Co-authored-by: David <[email protected]>
-
- Jan 28, 2021
-
-
Maciej Hirsz authored
* WIP reworking batches * Use a dense map over a Vec for BatchesState * Fix injecting, also fixes the integration test * Fix grumbles * Remove the superfluous boolean variable in control flow * BatchesElemId -> BatchesRequestId for consistency
-
- Jan 26, 2021
-
-
Aki authored
-
- Jan 21, 2021
-
-
Niklas Adolfsson authored
hashbrown 0.10 has been yanked, https://crates.io/crates/hashbrown/0.10.0
-