{"id":16645614,"url":"https://github.com/boolangery/d-rpc","last_synced_at":"2026-02-23T18:37:03.643Z","repository":{"id":44553138,"uuid":"138629870","full_name":"boolangery/d-rpc","owner":"boolangery","description":"RPC for D","archived":false,"fork":false,"pushed_at":"2021-08-29T14:11:20.000Z","size":90,"stargazers_count":2,"open_issues_count":4,"forks_count":1,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-10-27T04:35:02.956Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"D","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/boolangery.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-06-25T17:44:55.000Z","updated_at":"2019-10-22T05:52:18.000Z","dependencies_parsed_at":"2022-09-11T08:20:24.109Z","dependency_job_id":null,"html_url":"https://github.com/boolangery/d-rpc","commit_stats":null,"previous_names":[],"tags_count":2,"template":false,"template_full_name":null,"purl":"pkg:github/boolangery/d-rpc","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boolangery%2Fd-rpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boolangery%2Fd-rpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boolangery%2Fd-rpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boolangery%2Fd-rpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/boolangery","download_url":"https://codeload.github.com/boolangery/d-rpc/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/boolangery%2Fd-rpc/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":29750726,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-02-23T07:44:07.782Z","status":"ssl_error","status_checked_at":"2026-02-23T07:44:07.432Z","response_time":90,"last_error":"SSL_read: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"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":[],"created_at":"2024-10-12T08:24:30.704Z","updated_at":"2026-02-23T18:37:03.622Z","avatar_url":"https://github.com/boolangery.png","language":"D","funding_links":[],"categories":[],"sub_categories":[],"readme":"rpc\n===\n\n[![DUB Package](https://img.shields.io/dub/v/rpc.svg)](https://code.dlang.org/packages/rpc)\n[![Build Status](https://api.travis-ci.org/boolangery/d-rpc.svg?branch=master)](https://api.travis-ci.org/boolangery/d-rpc)\n\nAn rpc library aimed to be protocol agnostic. It's based on automatic interface implementation.\n\nIt currently support:\n\n* [Json RPC 2.0](https://www.jsonrpc.org/specification)\n* [Stratum](https://en.bitcoin.it/wiki/Stratum_mining_protocol)\n\n\n\nIt use vibed as HTTP and TCP driver.\n\nIt also use [vibe.data.json](http://vibed.org/api/vibe.data.json/) for json serialization.\n\nQuick start with dub\n----------------------\n\n```json\n\"dependencies\": {\n\t\"rpc\": \"*\"\n}\n```\n\n\nBasic usage\n-----------\n\nAn example showing how to fetch the last [Ethereum](https://www.ethereum.org/) block number using \nthe [rpc api](https://github.com/ethereum/wiki/wiki/JSON-RPC#eth_blocknumber).\n\n```d\nimport std.stdio;\nimport rpc.protocol.json;\n\n\ninterface IEthereumApi\n{\n    string eth_blockNumber();\n}\n\nvoid main()\n{\n\tenum EthNode = \"https://eth-mainnet.alchemyapi.io/jsonrpc/-vPGIFwUyjlMRF9beTLXiGQUK6Nf3k8z\";\n\tauto eth = new HttpJsonRpcAutoClient!IEthereumApi(EthNode);\n\n\twriteln(eth.eth_blockNumber());\n}\n```\n\nThe server for the above example could be implemented like this:\n\n\n```d\nimport rpc.protocol.json;\n\n\ninterface IEthereumApi\n{\n\tstring eth_blockNumber();\n}\n\nclass EthereumServer : IEthereumApi\n{\n\toverride string eth_blockNumber()\n\t{\n\t\treturn \"42\";\n\t}\n}\n\nvoid main()\n{\n\timport vibe.http.router;\n\t\n\tenum EthNode = \"https://eth-mainnet.alchemyapi.io/jsonrpc/-vPGIFwUyjlMRF9beTLXiGQUK6Nf3k8z\";\n\tauto eth = new HttpJsonRpcAutoClient!IEthereumApi(EthNode);\n\n\twriteln(eth.eth_blockNumber());\n\t\n\tauto router = new URLRouter();\n\tauto server = new HttpJsonRpcServer!int(router, \"/my_endpoint\");\n\tserver.registerInterface!IEthereumApi(new EthereumServer());\n\tlistenHTTP(\"127.0.0.1:8080\", router);\n}\n\n```\n\nYou can browse the `examples` folder for more information.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboolangery%2Fd-rpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fboolangery%2Fd-rpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fboolangery%2Fd-rpc/lists"}