{"id":15021734,"url":"https://github.com/chakrit/rpc","last_synced_at":"2026-01-02T08:47:36.262Z","repository":{"id":57497090,"uuid":"173745473","full_name":"chakrit/rpc","owner":"chakrit","description":"RPC without the `g` in front.","archived":false,"fork":false,"pushed_at":"2019-12-02T03:23:33.000Z","size":4664,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-01-23T02:14:04.660Z","etag":null,"topics":["golang","grpc","rpc"],"latest_commit_sha":null,"homepage":"","language":"Go","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/chakrit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-03-04T13:00:10.000Z","updated_at":"2019-12-02T03:23:36.000Z","dependencies_parsed_at":"2022-09-03T23:51:00.303Z","dependency_job_id":null,"html_url":"https://github.com/chakrit/rpc","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chakrit%2Frpc","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chakrit%2Frpc/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chakrit%2Frpc/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/chakrit%2Frpc/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/chakrit","download_url":"https://codeload.github.com/chakrit/rpc/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243885890,"owners_count":20363644,"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":["golang","grpc","rpc"],"created_at":"2024-09-24T19:56:57.665Z","updated_at":"2026-01-02T08:47:36.235Z","avatar_url":"https://github.com/chakrit.png","language":"Go","readme":"# RPC\n\nThis is project is **PRE-ALPHA** work-in-progress. Use at your own risk.\n\nRPC is an attempt at building a simple cross-language RPC framework that tries\nto provide gRPC-style code generation but without all the over-engineered\nfeatures that are only useful at Google scale. For example, we are never even\ngoing to think about rolling a custom HTTP2 server implementation or requiring\ndevelopers to install 4 different support libraries just to compile a\nbasic \"Hello, World\" program.\n\nPut another word, this is an RPC implementation that is designed for\nstartup-scale work favoring simplicity and ergonomics over extreme performance.\n\n### Goals\n\nWhile I do not think these goals will be unchallenged for long, I still believe\nit is worth trying. In order to make the most easy-to-use developer-centric RPC\npackage, we need to solve many hard problems.\n\nIn order to guide the architectural decisions that we may face, I'd like to\npropose:\n\n1. **Developer Ergonomics before Runtime Performance.**  \n   You should never need to think about whether or not your cloud provider\n   supports a custom HTTP/2 extension in order to use RPC. It should just work.\n   \n   RPC uses the target platform's HTTP and JSON implementation whenever\n   possible. There is no gain to be made from re-implementing web technologies\n   that already works.\n   \n2. **Fat Binary and Monolithic Designs until really, really unavoidable.**  \n   Plugin-based architecture is an interesting engineering problem. But they\n   do not contribute to end-user productivity. Whenever there is a design or\n   architectural choice to be made, we will choose the one which make the user\n   more productive first, always.\n   \n   RPC is a single binary that will run the same way anywhere. You should be\n   able to install a single binary, execute it with the same spec file, and get\n   the same output.\n   \n3. **Predictable Fallbacks over Precision Semantics**  \n   There is no need to have strongly-typed enums when a simple string field\n   suffice in a language without them.\n   \n   There is no need to have perfect target language semantic (like `nil` vs `\"\"`)\n   when we can just as easily side-step it in the RPC spec (have no `nil` value)\n   or use other simple predictable feature in the target language to get by.\n   \n   RPC will use the simplest possible fallback as often as needed. Even if it's\n   not the prettiest or purest. If there is a potential for bikeshedding to take\n   place, RPC will choose the choice that is the most boring.\n\n# Usage\n\nInstall:\n\n```sh\n$ go get github.com/chakrit/rpc\n```\n\nRun:\n\n```sh\n$ rpc -gen go -out /api todo.rpc\n```\n\n* `-gen (lang)` – Currently supports Go and Elm, for now.\n* `-out (folder)` - Outputs to specified folder.\n* `todo.rpc` - The RPC spec file.\n\nDevelop:\n\n```sh\n$ # make edits\n$ go get -v -u github.com/chakrit/smoke\n$ ./test.sh\n```\n\n# Spec File\n\nSyntax is a small language with braces.\n\n```\noption go_import \"github.com/chakrit/todo/rpc\"\noption go_package \"rpc\"\noption elm_module \"Rpc\"\n\nnamespace todo {\n  enum State {\n    Pending\n    Completed\n  }\n\n  type TodoItem {\n    string text\n    State state\n  }\n\n  rpc ListItems() list\u003cTodoItem\u003e\n  rpc AddItem(TodoItem) TodoItem\n}\n```\n\n* `option __name__ __value__` - Sets target-specific option.\n* `namespace __name__ { }` - Defines a scope.\n* `type __name__ { }` - Defines an object type (or class or message).\n* `enum __name__ { }` - Defines an enumeration of values.\n* `rpc __name__ ( __args__ ) __return_args__` - Defines an RPC call.\n\nBasic types:\n\n| Name   | What's generated\n| :--:   | :--\n| string | Strings\n| bool   | Booleans\n| int    | Default integer type. \n| long   | 64-bit variant integer type, if available.\n| float  | Default floating-point type.\n| double | 64-bit variant floating-point type, if available.\n| list   | Arrays or native list type.\n| map    | Dictionaries or hashes.\n| time   | Native time type, or same as `double` representing unix seconds.\n| data   | Raw data buffers.\n\n# LICENSE\n\nSee the LICENSE file included with the repository.\n\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchakrit%2Frpc","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fchakrit%2Frpc","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fchakrit%2Frpc/lists"}