{"id":19272064,"url":"https://github.com/ogstudio/cross-language-dialect","last_synced_at":"2026-04-02T18:52:31.035Z","repository":{"id":246957660,"uuid":"824721911","full_name":"OGStudio/cross-language-dialect","owner":"OGStudio","description":"Rules and tools for portable code | Правила и инструменты для портируемого кода","archived":false,"fork":false,"pushed_at":"2025-05-25T19:28:18.000Z","size":83,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2025-05-25T19:43:39.597Z","etag":null,"topics":["cpp","javascript","kotlin","python","swift"],"latest_commit_sha":null,"homepage":"","language":"Kotlin","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"cc0-1.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/OGStudio.png","metadata":{"files":{"readme":"README.md","changelog":"history/README.md","contributing":null,"funding":null,"license":"LICENSE","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,"zenodo":null}},"created_at":"2024-07-05T19:25:31.000Z","updated_at":"2025-03-03T19:27:54.000Z","dependencies_parsed_at":"2024-07-16T23:36:55.443Z","dependency_job_id":"b5749ffa-b051-421d-8504-038195173999","html_url":"https://github.com/OGStudio/cross-language-dialect","commit_stats":null,"previous_names":["ogstudio/cross-language-dialect"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/OGStudio/cross-language-dialect","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OGStudio%2Fcross-language-dialect","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OGStudio%2Fcross-language-dialect/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OGStudio%2Fcross-language-dialect/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OGStudio%2Fcross-language-dialect/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/OGStudio","download_url":"https://codeload.github.com/OGStudio/cross-language-dialect/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/OGStudio%2Fcross-language-dialect/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":266057171,"owners_count":23870120,"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":["cpp","javascript","kotlin","python","swift"],"created_at":"2024-11-09T20:35:18.049Z","updated_at":"2026-04-02T18:52:31.015Z","avatar_url":"https://github.com/OGStudio.png","language":"Kotlin","readme":"Cross-language dialect (**CLD**) is a set of tools and rules to write\nportable code for select programming languages at once.\n\nContext and Entities keep the state (data), they are described in YML and\ncan be converted to:\n\n* Kotlin\n\n# JavaScript\n\nRun tests in a web browser by opening `./javascript/do-test.html`\n\n# Swift\n\nBuild tests on macOS:\n\n$ `./swift/make`\n\nRun tests on macOS:\n\n$ `./swift/do-test`\n\n# Kotlin\n\nBuild tests on macOS:\n\n$ `./kotlin/make`\n\nRun tests on macOS:\n\n$ `./kotlin/do-test`\n\n# Translator\n\nBuild translator:\n\n$ `cd translator \u0026\u0026 ./gradlew jar`\n\nParse entities' YML:\n\n$ `cd translator \u0026\u0026 ./run/run-java --file=../test/test-dir/entities.yml --out=../test/test-dir/entities.kt --dbg`\n\n# Current availability of functions\n\n## Generation of entities\n\n| № | Type    | JavaScript | Kotlin | Swift |\n|---|---      |---         |---     |---    |\n| 1 | struct  | X          | √      | X     |\n| 2 | context | X          | √      | X     |\n\n## Generation of entity fields for Kotlin\n\n| № | YML type | Kotlin type | Default value | YML example | Kotlin example |\n|---|---       |---          |---            |---          |---             |\n| 1 | `Bool`   | `Boolean`   | `false`       | `didLaunch: Bool` | `var didLaunch: Boolean = false` |\n| 2 | `Double`   | `Double`   | `0`       | `angle: Double` | `var angle: Double = 0` |\n| 3 | `Int`   | `Int`   | `0`       | `selectedItemId: Int` | `var selectedItemId: Int = 0` |\n| 4 | `Long`   | `Long`   | `0`       | `timestamp: Long` | `var timestamp: Long = 0` |\n| 5 | `String` | `String`    | `\"\"`          | `method: String`  | `var method: String = \"\"` |\n| 6 | `Type` | `Type`    | `Type()`          | `request: NetRequest`  | `var request: NetRequest = NetRequest()` |\n| 7 | `[Type]` | `Array\u003cType\u003e` | `arrayOf()` | `arguments: [String]` | `var arguments: Array\u003cString\u003e = arrayOf()` |\n| 8 | `[TypeA: TypeB]` | `Map\u003cTypeA, TypeB\u003e` | `mapOf()` | `templates: [String: String]` | `var templates: Map\u003cString, String\u003e = mapOf()` |\n\n# Utilities\n\nUpdating the version in all files:\n\n$ `./util/update-version 1.0.1 1.1.0`\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fogstudio%2Fcross-language-dialect","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fogstudio%2Fcross-language-dialect","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fogstudio%2Fcross-language-dialect/lists"}