{"id":15992414,"url":"https://github.com/infiniteverma/rrpc","last_synced_at":"2026-01-06T21:54:56.672Z","repository":{"id":234961974,"uuid":"789814886","full_name":"InfiniteVerma/rrpc","owner":"InfiniteVerma","description":"A rust library that implements RPC","archived":false,"fork":false,"pushed_at":"2024-06-08T18:09:46.000Z","size":78,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-02T01:27:21.010Z","etag":null,"topics":["rpc","rust"],"latest_commit_sha":null,"homepage":"","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/InfiniteVerma.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-04-21T16:19:52.000Z","updated_at":"2024-06-08T18:09:49.000Z","dependencies_parsed_at":"2024-04-23T19:53:52.060Z","dependency_job_id":"9d3a8c5f-4476-459a-becf-c1e8458afdd9","html_url":"https://github.com/InfiniteVerma/rrpc","commit_stats":null,"previous_names":["infiniteverma/rrpc"],"tags_count":2,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InfiniteVerma%2Frrpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InfiniteVerma%2Frrpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InfiniteVerma%2Frrpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/InfiniteVerma%2Frrpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/InfiniteVerma","download_url":"https://codeload.github.com/InfiniteVerma/rrpc/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245938755,"owners_count":20697086,"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":["rpc","rust"],"created_at":"2024-10-08T06:21:46.557Z","updated_at":"2026-01-06T21:54:56.634Z","avatar_url":"https://github.com/InfiniteVerma.png","language":"Rust","funding_links":[],"categories":[],"sub_categories":[],"readme":"#### rrpc\n\nA rust library that implements Remote Procedure Calls. RPC is used in distributed computing to execute a function in a different address space but written as if it's a normal function call.\n\nJust a project to help me learn rust.\n\n![Untitled-2024-02-03-1338](https://github.com/InfiniteVerma/rrpc/assets/45547198/52d11371-482c-4d4c-8d77-d03cb7d5b8a4)\n\n#### Usage\n\n1. Clone the repo\n\n2. Build it to create `rrpc` binary\n```\ncargo build\n```\n\n3. Create your project\n```\ncargo new \u003cproj\u003e\n```\n\n4. Add rrpc as a build-dependency\n\n5. Design your IDL and write it `input.txt` (syntax below)\n\n6. Write build.rs using which call `rrpc` to generate `client_gen.rs` and `server_gen.rs`\n\n7. Use it in your source code\n\nRefer to example/ for a working solution.\n\n#### Syntax\n\nrrpc currently supports enum, struct and functions. Functions support just int and string as params (for now).\n\nExample .txt file:\n\n```\nFUNCTION my_func\nIN INT var1\nIN INT var2\nENDFUNCTION\n\nENUM test_enum\nval1 u32 1\nval2 u32 2\nENDENUM\n\nSTRUCT structName\nINT intvar \nSTRING str\nENDSTRUCT\n```\n\n#### Plan\n\nV1\n - [x] Base bones (lib + test)\n - [x] Get it running\n - [x] String parsing\n\nV2\n - [x] Pass port as a variable\n - [x] JSON serialization\n - [x] User can choose btw string/json at init time\n\nV3\n - [x] Multiple clients. To speed up, server listens and spawns a short lived thread to execute each request from a pool?\n - [x] If sync, server main thread executes and returns. If async, dispatches a worker thread to do the job\n\nV4\n - [x] Read from a .txt file and write to a .rs file\n - [x] Add test infra to test multiple scenarios\n - [x] Support enum\n - [x] Support struct with basic data types (int and string)\n\nV5\n - [x] Support functions\n - [x] Use json to pack and unpack\n - [x] Test with dummy mains\n\nV6\n - [x] Crate logic cleanup. Have a single crate?\n - [x] Import it and try using it to generate .rs files\n - [x] Fix client packing\n\nV7\n - [ ] ~~Build shared libraries and link them~~\n - [x] Using above .txt cons, signatures of txt functions will be available to client and definition in server\n - [x] How would a user pass this?\n\nV8\n - [x] Example project using the rpc crate\n\nV9\n - [ ] Pass enum, structs created in .txt file in the functions\n - [ ] Support synchronous functions\n - [ ] Server should use worker threads for async functions and main thread for sync functions\n\nV10\n - [ ] Proper error handling\n - [ ] Refactor. Try to understand more about designing code in rust.\n\nV11\n - [ ] Horizontal and vertical scaling?\n - [ ] Parse a language instead of simply structs and enums?\n - [ ] Do computation in parts and then aggregate?\n\n#### End Goal\n\n - user imports this crate as a dependency\n - make a .txt file with the specified IDL\n - make a small 'build.rs' to generate code\n   - generates all the files\n - user codes their client + server implementation around it\n\n#### References\n - https://doc.rust-lang.org/book/ch20-01-single-threaded.html\n - https://doc.rust-lang.org/book\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfiniteverma%2Frrpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Finfiniteverma%2Frrpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Finfiniteverma%2Frrpc/lists"}