- Nov 19, 2021
-
-
Niklas Adolfsson authored
* feat: override `method` subscription notif * Arrow syntax for overwrites (#569) * check that unique notifs are used * check that custom sub name is unique * cargo fmt * address grumbles * Update proc-macros/src/rpc_macro.rs * commit added tests * Update proc-macros/src/render_server.rs Co-authored-by: David <[email protected]> * Update proc-macros/src/render_server.rs Co-authored-by: David <[email protected]> * Update proc-macros/src/rpc_macro.rs Co-authored-by: David <[email protected]> * Update proc-macros/src/rpc_macro.rs Co-authored-by: David <[email protected]> * Update utils/src/server/rpc_module.rs Co-authored-by: David <[email protected]> * grumbles * fix long lines * 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 proc-macros/src/rpc_macro.rs Co-authored-by: David <[email protected]> * Update proc-macros/src/render_server.rs Co-authored-by: David <[email protected]> * Update proc-macros/src/render_server.rs Co-authored-by: David <[email protected]> * more grumbles Co-authored-by: Maciej Hirsz <[email protected]> Co-authored-by: David <[email protected]>
-
- Nov 17, 2021
-
-
Niklas Adolfsson authored
* fix: enable several sockaddress when starting servers * nits * more verbose asserts in rustdoc tests * fix tests * fix tests again
-
- Nov 09, 2021
-
-
Niklas Adolfsson authored
* ws server: don't kill connection max limit exceeds * Update ws-server/src/server.rs * actually use max size in soketto * rewrite me * improve logs * use soketto fix * rewrite me * fix nit * revert unintentional change * use soketto 0.7.1 * fix logger * Update ws-server/src/server.rs Co-authored-by: David <[email protected]> * Update ws-server/src/server.rs Co-authored-by: David <[email protected]> * Update ws-server/src/server.rs Co-authored-by: David <[email protected]> * Update ws-server/src/server.rs Co-authored-by: David <[email protected]> * Update ws-server/src/server.rs Co-authored-by: David <[email protected]> * fix build Co-authored-by: David <[email protected]>
-
- Nov 08, 2021
-
-
Chris Sosnin authored
* Implement Future for server handles * Explicitly assert timeout errors in tests
-
- Oct 15, 2021
-
-
Niklas Adolfsson authored
-
- Oct 12, 2021
-
-
Niklas Adolfsson authored
-
Niklas Adolfsson authored
* update CHANGELOG * bump version number * fix nit * Update CHANGELOG.md Co-authored-by: David <[email protected]> * bullet list in CHANGELOG * add last item to CHANGELOG Co-authored-by: David <[email protected]>
-
- Oct 11, 2021
-
-
Niklas Adolfsson authored
* [ws server]: refactor start() * remove needless clone * fix http server too * fmt * unify stop APIs * fix bad merge * add API to use custom tokio runtime * use futures oneshot * fix unintentional change * Revert "use futures oneshot" This reverts commit 0432f6ba41d49a3494943458657a31f8afd79160. * Update http-server/src/server.rs Co-authored-by: Maciej Hirsz <[email protected]> Co-authored-by: Maciej Hirsz <[email protected]>
-
Niklas Adolfsson authored
* fix(ParamsSer): serialize to empty array Serialize `ParamsSer::NoParams` to an empty array inorder to comply with the jsonrpc v2 spec. * fix tests * remove ParamsSer::NoParams * address grumbles: adjust rpc params macro
-
Maciej Hirsz authored
* Squash post merge * RAII claims and some comments * Adding resources to Methods * Use arrays for claiming all resources at once * Register resources on ws-server * Return MethodResourcesBuilder from register_method * Return MethodResourcesBuilder from register_async_method * fmt and comments * Add `verify_and_insert` to get rid of `or_insert` in order to get mut ref to value * Resources initialization * No need for ResourceBuilder * Comment all the things * Handle errors on ws-server `start` method * Passing ResourceGuard to method execution * Start ws-server in background, simplify all the tests! * Claiming resources on runtime * Do checked math on resource claiming * Clearer error path for resources at limit * Resource limiting tests WIP * Unbox async futures * fmt * Cleaner proc macro * Fix lifetime issues with ResourceGuard with internal Arc * Remove unnecessary lifetime generic * Working tests * Use turbofish in tests * fmt * Fixed (?) benches * Apply suggestions from code review Co-authored-by: David <[email protected]> * Tweak more grumbles * Adding a test for resource limiting with proc macros (WIP) * Reworking attribute macros for resource limiting (#507) * Squashed macros WIP * bae-less macros! * Make things simpler and more readable * Some comments and DRY aliases parsing * Naming things is hard * Respan is no longer needed * Simpler Arguments * Remove stale code * Apply suggestions from code review Co-authored-by: Niklas Adolfsson <[email protected]> * syn-up all the things, handle resources on methods Co-authored-by: Niklas Adolfsson <[email protected]> * Resource limiting on the http server * Test two resources at once * Test the HTTP server for resource limiting * Apply suggestions from code review Co-authored-by: David <[email protected]> Co-authored-by: Niklas Adolfsson <[email protected]> * Comment tweaks * More explicit error type for `AttributeMeta::retain` * Remove generic from ResourceTable; derive Default on ws Builder * Make the macros shorter Co-authored-by: David <[email protected]> Co-authored-by: Niklas Adolfsson <[email protected]>
-
- Oct 01, 2021
-
-
David authored
* Add a convenience macro to build `ParamsSer` for use in clients * Add actual macro * fmtwtf
-
- Sep 24, 2021
-
-
Squirrel authored
-
- Sep 21, 2021
-
-
Niklas Adolfsson authored
-
- Sep 16, 2021
-
-
David authored
* Re-export v2::params, error, request and response types * Use shallow type paths
-
- Sep 15, 2021
-
-
David authored
* Renames * More renames * fmt * s/RpcParams/Params/ * Add a type alias `SubscriptionResponse` to `Notification` which is parametrized to `SubscriptionPayload` Move `SubscriptionResponse` to the `response` module * Fix doc links * Cleanup and some docs * Review feedback * cleanup
-
- Sep 09, 2021
-
-
Niklas Adolfsson authored
Similar to #435 that adds the same restrictions to subscriptions too. To avoid having faulty trait bounds on when the subcription actually returns Result.
-
- Sep 01, 2021
-
-
Niklas Adolfsson authored
* feat: alias attribute for proc macros * implement David's suggested no more unsub field * keep aliases outside namespace * revert example * fix build * Update proc-macros/src/attributes.rs Co-authored-by: David <[email protected]> * grumbles: alias -> aliases * grumbles v2: alias -> aliases Co-authored-by: David <[email protected]>
-
- Aug 27, 2021
-
-
Niklas Adolfsson authored
* PoC support generic type params * more annoying example * add trait bounds for generic params in proc macros * add compile-time test for complicated trait * smarter trait bounds in proc macros * add non-working example for now * revert nits * Update examples/proc_macro.rs Co-authored-by: David <[email protected]> * Update proc-macros/src/helpers.rs Co-authored-by: David <[email protected]> * add messy code but works * cleanup * add some simple compile check in tests * fix doc link * fix doc link last time * address grumbles * docs * Update proc-macros/src/helpers.rs * Update proc-macros/src/helpers.rs * Update proc-macros/src/helpers.rs * Update proc-macros/src/helpers.rs * Update proc-macros/src/visitor.rs * fix nit: | -> || * Update proc-macros/src/helpers.rs Co-authored-by: David <[email protected]> * Update proc-macros/src/helpers.rs Co-authored-by: David <[email protected]> * Update proc-macros/src/helpers.rs Co-authored-by: David <[email protected]> * add issues to introduced TODOs * generics support where clause on trait * Update proc-macros/src/helpers.rs Co-authored-by: David <[email protected]> * Update proc-macros/src/helpers.rs * address grumbles * add more docs Co-authored-by: David <[email protected]>
-
- Aug 25, 2021
-
-
David authored
* Add license headers where missing and update year * Update examples/http.rs Co-authored-by: Niklas Adolfsson <[email protected]> Co-authored-by: Niklas Adolfsson <[email protected]>
-
- Aug 18, 2021
-
-
Niklas Adolfsson authored
* rewrite me * require proc macro API to return result * send unknown message when error is not CallError * show example that auto cast StdError doesn't work * register_*_method Into<Error> * clippy * replace generic errors with anyhow::Error * fix nits * example that anyhow::Error in register_method works * CallError: add missing From impl * [types]: add helper methods for Error types The rationale is to make it possible for users to either use anyhow::Error or use the helper methods. * fmt * Revert "register_*_method Into<Error>" This reverts commit 33b4fa28730b72647ba150659d3c0ab1937e524a. * add better comment * fix nit
-
- Aug 13, 2021
-
-
Niklas Adolfsson authored
* fix: update example to new proc macros * remove unused code * remove client builder
-
- Jul 15, 2021
-
-
dependabot[bot] authored
Updates the requirements on [env_logger](https://github.com/env-logger-rs/env_logger) to permit the latest version. - [Release notes](https://github.com/env-logger-rs/env_logger/releases) - [Changelog](https://github.com/env-logger-rs/env_logger/blob/main/CHANGELOG.md) - [Commits](https://github.com/env-logger-rs/env_logger/compare/v0.8.0...v0.9.0 ) --- updated-dependencies: - dependency-name: env_logger dependency-type: direct:production ... Signed-off-by: dependabot[bot] <[email protected]> Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
-
- Jul 12, 2021
-
-
Maciej Hirsz authored
* Do not register methods on servers * fmt * Infallible `to_rpc` proc macro * Remove dead code * Check for duplicate names at compile time * Add a UI test for name conflicts * Apply suggestions from code review Co-authored-by: David <[email protected]> Co-authored-by: David Palm <[email protected]>
-
David authored
* Include "macros" in the "server" feature * Re-export SubscriptionSink * Include the "types" feature in both the "client" and "server" features Export types::* from façade when the "types" is active Export types::* from servers * fmt * Export jsonrpsee_types under types * fmt * broken doc link * fix benches * fmt * Fix test imports
- Jun 04, 2021
-
-
Niklas Adolfsson authored
* [rpc module]: server-side close subscription Add functionality that closes the subscription after the sink has been dropped. * [integration tests]: add timeout on futures * remove global subscriber mutex * fix nit * [client types]: fix #349 Subscription::next() propogate error when parsing the response fails * [client types]: fix #349 Subscription::next() propogate error when parsing the response fails * unify subscription and notification * rename again * send notif response when subscription is dropped * stray debug stuff * Update utils/src/server/rpc_module.rs Co-authored-by: David <[email protected]> * Revert "[client types]: fix #349" This reverts commit c4fefade719ebd8c964a62d0eb16f89db3346ccd. * Revert "[integration tests]: add timeout on futures" This reverts commit 21dfb99649aaaa8c847a693b4510e0202498fa2c. * show that actual edge-case * fix nit * Update types/src/traits.rs * fix bad merge * ugly; but works * complete solution * get rid of Option * Update tests/tests/integration_tests.rs * Update utils/src/server/rpc_module.rs * Update utils/src/server/rpc_module.rs Co-authored-by: David <[email protected]> * grumbles: fix faulty early return * remove weird abstraction KeepAlive * fix nits * revert test timeouts * address grumbles * fix build Co-authored-by: David <[email protected]>
-
- Jun 03, 2021
-
-
Niklas Adolfsson authored
* [client types]: fix #349 Subscription::next() propogate error when parsing the response fails * unify subscription and notification * rename again * Update types/src/traits.rs * fix bad merge * Update types/src/client.rs Co-authored-by: David <[email protected]> * grumbles: subscribe_method -> subscribe_to_method * Update tests/tests/integration_tests.rs Co-authored-by: David <[email protected]> * grumbles: doc links Co-authored-by: David <[email protected]>
-
David authored
* Add a builder to the ws server * Use the WsServerBuilder in tests&examples * cleanup * fmt * Fix benches * fix error message * Add connection count limiting and associated config item * Use the strong_count to `methods` to know how many connections we currently have * Fix test
-
- Jun 01, 2021
-
-
Igor Aleksanov authored
-
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 24, 2021
-
-
David authored
* Switch from anyhow::Result to std Result * fmt * Use thiserror `#[from]` * Remove sadness
-
- Apr 20, 2021
-
-
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 15, 2021
-
-
Niklas Adolfsson authored
* add wrapper crate * add jsonrpsee crate back * [jsonrpsee]: feature gate modules * [proc macros]: support crate renaming of `types` * Update proc-macros/src/lib.rs Co-authored-by: David <[email protected]> * re-export types * [proc macros]: remove unused features * Update proc-macros/Cargo.toml * fix bad merge Co-authored-by: David <[email protected]>
-
- Apr 01, 2021
-
-
Niklas Adolfsson authored
* [ws client]: client builder for uniform API * Update ws-client/src/transport.rs * Update ws-client/src/client.rs * Update ws-client/src/client.rs * Update ws-client/src/client.rs
-
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 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]>
-
- Feb 23, 2021
-
-
Maciej Hirsz authored
* Re-apply changes * Fixed tests * 3 to go * Passing tests! * Fix formatting * Fix formatting in tests * Fixed examples * Bind listener when server starts * Formatting, disable deadlock test to check CI * Fixed deadlock test * Fix benches * Remove dead code * Restoring unit tests * Restored all unit tests * Missing unwraps Co-authored-by: Niklas Adolfsson <[email protected]> * Missing unwraps Co-authored-by: Niklas Adolfsson <[email protected]> * Typo :) Co-authored-by: Niklas Adolfsson <[email protected]> * Remove broken connections from subscriptions * Tweak tests * Add some doc comments Co-authored-by: Niklas Adolfsson <[email protected]>
-