{"id":16154250,"url":"https://github.com/thomaseizinger/rust-jsonrpc-client","last_synced_at":"2025-03-18T19:33:01.106Z","repository":{"id":47581462,"uuid":"280052311","full_name":"thomaseizinger/rust-jsonrpc-client","owner":"thomaseizinger","description":"A macro-driven JSON-RPC client for Rust.","archived":false,"fork":false,"pushed_at":"2024-03-25T07:46:13.000Z","size":167,"stargazers_count":4,"open_issues_count":9,"forks_count":6,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-03-15T15:52:08.790Z","etag":null,"topics":["jsonrpc","proc-macro"],"latest_commit_sha":null,"homepage":"https://docs.rs/jsonrpc_client","language":"Rust","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/thomaseizinger.png","metadata":{"files":{"readme":"README.md","changelog":"CHANGELOG.md","contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-07-16T04:24:04.000Z","updated_at":"2024-03-28T23:31:26.000Z","dependencies_parsed_at":"2024-10-27T19:11:04.589Z","dependency_job_id":"f9a05b95-4c98-4d01-8b01-63222d3a3485","html_url":"https://github.com/thomaseizinger/rust-jsonrpc-client","commit_stats":{"total_commits":86,"total_committers":3,"mean_commits":"28.666666666666668","dds":"0.023255813953488413","last_synced_commit":"ae9754fad8bab88f8788992de2adfa13d8f1399b"},"previous_names":[],"tags_count":7,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomaseizinger%2Frust-jsonrpc-client","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomaseizinger%2Frust-jsonrpc-client/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomaseizinger%2Frust-jsonrpc-client/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/thomaseizinger%2Frust-jsonrpc-client/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/thomaseizinger","download_url":"https://codeload.github.com/thomaseizinger/rust-jsonrpc-client/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243754023,"owners_count":20342538,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["jsonrpc","proc-macro"],"created_at":"2024-10-10T01:15:48.986Z","updated_at":"2025-03-18T19:32:56.092Z","avatar_url":"https://github.com/thomaseizinger.png","language":"Rust","readme":"# No bullshit JSON-RPC client for Rust\n\n## Features\n\n- No boilerplate: Driven by proc-macros\n- No client lock-in: Complete freedom over underlying HTTP client\n- Lightweight: Only depends on syn and serde\n- Async-ready\n\n## How does it work?\n\nWe take a trait as input to a proc-macro and output another one that has default implementations for all the functions.\nThis allows us to take away all the boilerplate of making JSON-RPC calls and you get to define a nice interface at the same time!\n\n## How do I use it?\n\n1. Depend on `jsonrpc_client`:\n\n   ```toml\n   [dependencies]\n   jsonrpc_client = { version = \"*\", features = [\"reqwest\"] }\n   ```\n\n2. Define a trait that describes the JSON-RPC API you want to talk to and annotate it with `#[jsonrpc_client::api]`:\n   ```rust\n   #[jsonrpc_client::api]\n   pub trait Math {\n       async fn subtract(\u0026self, subtrahend: i64, minuend: i64) -\u003e i64;\n   }\n   ```\n\n3. Define your client:\n\n   ```rust\n   #[jsonrpc_client::implement(Math)]\n   struct Client {\n       inner: reqwest::Client,\n       base_url: reqwest::Url,\n   }\n   ```\n\n4. Start using your client!\n\n## Backends\n\nCurrently, the client supports several backends, all of them can be activated via a separate feature-flag:\n\n- reqwest\n- surf\n- isahc\n\nSupport for more backends is welcomed.\n\nUnfortunately, not all can be supported.\nIn particular:\n\n- hreq: Cannot be supported because their `Agent` takes `\u0026mut self` for sending a request which doesn't work with the `SendRequest` trait.\n- awc: Cannot be supported because their `Client` does not implement `Send`.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomaseizinger%2Frust-jsonrpc-client","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fthomaseizinger%2Frust-jsonrpc-client","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fthomaseizinger%2Frust-jsonrpc-client/lists"}