{"id":23806794,"url":"https://github.com/webrpc/gen-kotlin","last_synced_at":"2025-10-16T20:28:29.796Z","repository":{"id":220124065,"uuid":"675436990","full_name":"webrpc/gen-kotlin","owner":"webrpc","description":"webrpc Kotlin client generator","archived":false,"fork":false,"pushed_at":"2024-04-04T14:43:39.000Z","size":85,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-01-01T23:14:27.360Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","language":"Kotlin","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/webrpc.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","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}},"created_at":"2023-08-06T22:57:34.000Z","updated_at":"2024-04-08T16:35:13.000Z","dependencies_parsed_at":"2024-04-04T15:52:55.464Z","dependency_job_id":"aa21165b-a080-4994-82bd-08327a9f327d","html_url":"https://github.com/webrpc/gen-kotlin","commit_stats":null,"previous_names":["webrpc/gen-kotlin"],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webrpc%2Fgen-kotlin","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webrpc%2Fgen-kotlin/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webrpc%2Fgen-kotlin/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/webrpc%2Fgen-kotlin/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/webrpc","download_url":"https://codeload.github.com/webrpc/gen-kotlin/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":240059616,"owners_count":19741690,"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":[],"created_at":"2025-01-01T23:14:49.734Z","updated_at":"2025-10-16T20:28:24.757Z","avatar_url":"https://github.com/webrpc.png","language":"Kotlin","funding_links":[],"categories":[],"sub_categories":[],"readme":"# gen-kotlin\n\nThis repo contains the templates used by the `webrpc-gen` cli to code-generate\nwebrpc Kotlin client code.\n\nThis generator, from a webrpc schema/design file will code-generate:\n\n1. Client -- a Kotlin client (via Ktor and Moshi) to speak to a webrpc server using the\nprovided schema. This client is compatible with any webrpc server language (ie. Go, nodejs, etc.).\n\n## Dependencies\n\nIn order to support communication with server, dependencies to few libraries must be provided.\nThis is a dependency of the generated code, so you must add it to your project.\n\nAdd this to `build.gradle.kts`:\n```kotlin\nval coroutinesVersion = \"1.7.3\"\nimplementation(\"org.jetbrains.kotlinx:kotlinx-coroutines-core:$coroutinesVersion\")\n\nval moshiVersion = \"1.15.0\"\nimplementation(\"com.squareup.moshi:moshi-kotlin:$moshiVersion\")\nimplementation(\"com.squareup.moshi:moshi-kotlin-codegen:$moshiVersion\")\nimplementation(\"com.squareup.moshi:moshi-adapters:$moshiVersion\")\n\nval ktorVersion = \"2.3.7\"\nimplementation(\"io.ktor:ktor-client-core:$ktorVersion\")\nimplementation(\"io.ktor:ktor-client-logging:$ktorVersion\")\nimplementation(\"io.ktor:ktor-client-cio-jvm:$ktorVersion\")\n\n// implementation(\"ch.qos.logback:logback-classic:1.4.14\") // Optional for logging\n```\n\n## Usage\n\n```\nwebrpc-gen -schema=example.ridl -target=kotlin -client -out=./example.gen.kt\n```\n\nor \n\n```\nwebrpc-gen -schema=example.ridl -target=github.com/webrpc/gen-kotlin@v0.14.0 -client -out=./example.gen.kt\n```\n\nor\n\n```\nwebrpc-gen -schema=example.ridl -target=./local-templates-on-disk -client -out=./example.gen.kt\n```\n\nAs you can see, the `-target` supports default `kotlin`, any git URI, or a local folder :)\n\n### Set custom template variables\nChange any of the following values by passing `-option=\"Value\"` CLI flag to `webrpc-gen`.\n\n| webrpc-gen -option              | Description                | Default value              |\n|---------------------------------|----------------------------|----------------------------|\n| `-client`                       | generate client code       | unset (`false`)            |\n| `-packageName=%package name%`   | define package name        | `io.webrpc.client`         |\n\n## LICENSE\n\n[MIT LICENSE](./LICENSE)","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebrpc%2Fgen-kotlin","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fwebrpc%2Fgen-kotlin","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fwebrpc%2Fgen-kotlin/lists"}